nodes: 0, module; 1, function_definition; 2, function_name:_mapped_populations; 3, parameters; 4, block; 5, identifier:mdl1; 6, identifier:mdl2; 7, expression_statement; 8, expression_statement; 9, for_statement; 10, return_statement; 11, comment:"""
      Method to get the populations for states in mdl 1
      from populations inferred in mdl 2. Resorts to 0
      if population is not present.
      """; 12, assignment; 13, identifier:i; 14, call; 15, block; 16, identifier:return_vect; 17, identifier:return_vect; 18, call; 19, identifier:range; 20, argument_list; 21, try_statement; 22, attribute; 23, argument_list; 24, attribute; 25, comment:#there has to be a better way to do this; 26, block; 27, except_clause; 28, identifier:np; 29, identifier:zeros; 30, attribute; 31, identifier:mdl1; 32, identifier:n_states_; 33, expression_statement; 34, expression_statement; 35, expression_statement; 36, block; 37, identifier:mdl1; 38, identifier:n_states_; 39, assignment; 40, assignment; 41, assignment; 42, pass_statement; 43, identifier:mdl1_unmapped; 44, subscript; 45, identifier:mdl2_mapped; 46, subscript; 47, subscript; 48, subscript; 49, subscript; 50, integer:0; 51, attribute; 52, identifier:mdl1_unmapped; 53, identifier:return_vect; 54, identifier:i; 55, attribute; 56, identifier:mdl2_mapped; 57, call; 58, integer:0; 59, identifier:mdl2; 60, identifier:mapping_; 61, identifier:mdl2; 62, identifier:populations_; 63, attribute; 64, argument_list; 65, identifier:mdl1; 66, identifier:inverse_transform; 67, list; 68, identifier:i
code: 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