def find_key_case_insensitive(key_name, the_dict):
    """
    Finds if a dictionary (the_dict) has a string key (key_name) in any string case

    Args:
        key_name: the key to search in the dictionary
        the_dict: the dictionary to search

    Returns:
        The found key name in its original case, if found. Otherwise, returns the searching key name

    """
    for key in the_dict:
        if key.lower() == key_name:
            return key
    return key_name