(entities, entity_id)
Gets the parent entity from the collection, or throws ParentDoesNotExist.
Gets the parent entity from the collection, or throws ParentDoesNotExist.
Gets the parent entity from the collection or throws ParentDoesNotExist .
def _get_parent_entity(entities, entity_id):
    """
    Gets the parent entity from the collection, or throws ParentDoesNotExist.
    """
    try:
        return entities[entity_id]
    except KeyError:
        raise ParentDoesNotExist(object_type='Entity', key=entity_id)
def _get_parent_entity ( entities , entity_id ) : try : return entities [ entity_id ] except KeyError : raise ParentDoesNotExist ( object_type = 'Entity' , key = entity_id )