'Delete all child regions.
Recursively delete any region that has the supplied region
as its parent.'

def _delete_child_regions(self, session, region_id, root_region_id):

    children = session.query(Region).filter_by(parent_region_id=region_id)
    for child in children:
        if (child.id == root_region_id):
            return
        self._delete_child_regions(session, child.id, root_region_id)
        session.delete(child)
