'Populates entry fields from a source object using a dictionary that maps from entry field names to
attributes (or keys) in the source object.
:param dict field_map:
A dictionary mapping entry field names to the attribute in source_item (or keys,
if source_item is a dict)(nested attributes/dicts are also supported, separated by a dot,)
or a function that takes source_item as an argument
:param source_item:
Source of information to be used by the map
:param ignore_none:
Ignore any None values, do not record it to the Entry'

def update_using_map(self, field_map, source_item, ignore_none=False):

    func = (dict.get if isinstance(source_item, dict) else getattr)
    for (field, value) in field_map.items():
        if isinstance(value, str):
            v = functools.reduce(func, value.split(u'.'), source_item)
        else:
            v = value(source_item)
        if (ignore_none and (v is None)):
            continue
        self[field] = v
