def extract_keys(the_dict, prefix=''):
    """
    Recursive approach to gather all the keys that have nested keys in the input file.
    Input:
        The dictionary file to find all the keys in.
    Output:
        All the keys found in the nested dictionary.
        Example:
        Consider {key1:value1, key2:{key3:value3}, key4:[value4], key5:[key6:{key7:value7}]}
        The function returns key2, key5=key6
    """
    key_list = []
    for key, value in the_dict.items():

        if len(prefix) == 0:
            new_prefix = key
        else:
            new_prefix = prefix + '=' + key

        try:
            if type(value) == dict:
                key_list.extend(extract_keys(value, new_prefix))
            elif type(value) == list and type(value[0]) == dict:
                key_list.extend(extract_keys(value[0], new_prefix))
            elif type(value) == list and type(value[0]) != dict:
                key_list.append(new_prefix)
            else:
                key_list.append(new_prefix)
        except:
            key_list.append(new_prefix)

    return key_list