def attrib_to_dict(element, *args, **kwargs):
if len(args) > <NUM_LIT:0>:<EOL><INDENT>return {key: element.get(key) for key in args}<EOL><DEDENT>if len(kwargs) > <NUM_LIT:0>:<EOL><INDENT>return {new_key: element.get(old_key) for new_key, old_key in viewitems(kwargs)}<EOL><DEDENT>return element.attrib<EOL>
For an ElementTree ``element`` extract specified attributes. If an attribute does not exists, its value will be
    ``None``.

    attrib_to_dict(element, 'attr_a', 'attr_b') -> {'attr_a': 'value', 'attr_a': 'value'}

    Mapping between xml attributes and dictionary keys is done with kwargs.
    attrib_to_dict(element, my_new_name = 'xml_atribute_name', ..)