A conviction of an offense in any state, territory, or possession of the United States, the District of Columbia, the Commonwealth of Puerto Rico, or the Dominion of Canada that, if committed in this state, would be a violation of Section 23152 or 23153 of this code, or Section 191.5 of, or subdivision (a) of Section 192.5 of, the Penal Code, is a conviction of Section 23152 or 23153 of this code, or Section 191.5 of, or subdivision (a) of Section 192.5 of, the Penal Code for the purposes of this code.