def _marshall_list(self, values, field: 'mapping.List', entity, skip_none: bool, use_foreign_key: bool):
    if (field.function and callable(field.function)):
        e_list = invoke(field.function, entity)
    else:
        e_list = getattr_(entity, field.name, None)
    elem = field.element
    if isinstance(elem, types.db.DataType):
        values[field.name] = [e for e in e_list]
    elif isinstance(elem, mapping.Definition):
        d = self.response(elem.model_name, elem.model_key)
        values[field.name] = self.marshall(d, e_list, skip_none=skip_none, as_list=True, use_foreign_key=use_foreign_key)
def _marshall_list(self, values, field: 'mapping.List', entity, skip_none: bool, use_foreign_key: bool):
    if (field.function and callable(field.function)):
        e_list = invoke(field.function, entity)
    else:
        e_list = getattr_(entity, field.name, None)
    elem = field.element
    if isinstance(elem, types.db.DataType):
        values[field.name] = [e for e in e_list]
    elif isinstance(elem, mapping.Definition):
        d = self.response(elem.model_name, elem.model_key)
        values[field.name] = self.marshall(d, e_list, skip_none=skip_none, as_list=True, use_foreign_key=use_foreign_key)