def get_named_entity(annotation):
    """
    Extracts a named entity from an annotation

    Parameters
    ----------
    - annotation : Kili annotation
    """
    try:
        return {
            'beginId': annotation['beginId'],
            'beginOffset': annotation['beginOffset'],
            'content': annotation['content'],
            'endId': annotation['endId'],
            'endOffset': annotation['endOffset']
        }
    except KeyError:
        return None