'Delete the orphan and any of its descendants which no longer have parents.'

@contract(orphan=BlockKey)
def _delete_if_true_orphan(self, orphan, structure):

    if (len(self._get_parents_from_structure(orphan, structure)) == 0):
        orphan_data = structure['blocks'].pop(orphan)
        for child in orphan_data.fields.get('children', []):
            self._delete_if_true_orphan(BlockKey(*child), structure)
