def get_id(element) -> str:
    """
    Return the ID of an event or series.

    :param element: event or series
    :type element: dict
    :return: ID of element
    :rtype: str
    """

    if "id" in element:
        return element["id"]
    elif "identifier" in element:
        return element["identifier"]
    else:
        raise ValueError("Element has no ID")