def get_parent_id(an_id: str) -> str:
    """
    given an id - get the parent id.
    for most items - it will be the id before the last /
    for .json or .xml - it will be the id up to the .json/.xml
    """
    parent_id = an_id.rsplit("/", 1)[0]
    if an_id.find(".xml") > 0:
        parent_id = an_id[: an_id.find(".xml") + 4]
    elif an_id.find(".json") > 0:
        parent_id = an_id[: an_id.find(".json") + 5]

    return parent_id