@staticmethod
def _marshall_field(values, field: 'mapping.Field', entity, skip_none: bool):
    if (field.function is not None):
        value = field.function(entity)
    else:
        value = getattr_(entity, field.key, None)
    if (field.formatting is not None):
        value = field.formatting(value)
    if ((not skip_none) or (value is not None)):
        values[field.name] = value
@staticmethod
def _marshall_field(values, field: 'mapping.Field', entity, skip_none: bool):
    if (field.function is not None):
        value = field.function(entity)
    else:
        value = getattr_(entity, field.key, None)
    if (field.formatting is not None):
        value = field.formatting(value)
    if ((not skip_none) or (value is not None)):
        values[field.name] = value