'Extract attributes from the element based on rules provided in the
mapping dictionary.
:param      element: Element to parse the values from.
:type       element: xml.etree.ElementTree.Element.
:param      mapping: Dictionary with the extra layout
:type       node: :class:`Node`
:rtype: ``dict``'

def _get_extra_dict(self, element, mapping):

    extra = {}
    for (attribute, values) in mapping.items():
        transform_func = values['transform_func']
        value = findattr(element=element, xpath=values['xpath'], namespace=NAMESPACE)
        if (value is not None):
            extra[attribute] = transform_func(value)
        else:
            extra[attribute] = None
    return extra
