<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _mapped_populations(mdl1, mdl2):
 """ Method to get the populations for states in mdl 1 from populations inferred in mdl 2. Resorts to 0 if population is not present. """

    return_vect = np.zeros(mdl1.n_states_)
    for i in range(mdl1.n_states_):
        try:
            #there has to be a better way to do this
            mdl1_unmapped = mdl1.inverse_transform([i])[0][0]
            mdl2_mapped = mdl2.mapping_[mdl1_unmapped]
            return_vect[i] =  mdl2.populations_[mdl2_mapped]
        except:
            pass
    return return_vect