def get_nth_index(dictionary, search_key):
    """
    From a dictionary, get the nth key

    Args:
        dictionary (dict): Dictionary to retrieve from
        search_key (str): Key to search for

    Raises:
        IndexError: Key not found

    Returns:
        int: Index of the search_key
    """
    for i, key in enumerate(dictionary):
        if key == search_key:
            return i
    raise IndexError("dictionary index out of range")