@staticmethod
def _get_region_from_ancestors(element):
    """Try to get the region ID from the nearest ancestor that has it
        """
    region_id = None
    parent = element.parent
    while parent:
        region_id = parent.get(u'region')
        if region_id:
            break
        parent = parent.parent
    return region_id
