def dict_from_element(self, ctx, cls, element): children = element.getchildren() if children: return etree_to_dict(element) return None