: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

def populate_instance(msg, inst):
    """
    :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
    """
    return _to_inst(msg, type(inst).__name__, type(inst).__name__, inst)