code: def populate_instance(msg, inst):
      
      return _to_inst(msg, type(inst).__name__, type(inst).__name__, inst)
docs: :param msg: contains the values to use to populate inst.
      :param inst: message class instance to populate.
      :return: an instance of the provided message class, with its fields populated according to the values in msg