<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def search_all(self, queries, audio_basename=None, case_sensitive=False, subsequence=False, supersequence=False, timing_error=0.0, anagram=False, missing_word_tolerance=0):
 """ Returns a dictionary of all results of all of the queries for all of the audio files. All the specified parameters work per query. Parameters queries : [str] or str A list of the strings that'll be searched. If type of queries is `str`, it'll be insterted into a list within the body of the method. audio_basename : str, optional Search only within the given audio_basename. Default is `None`. case_sensitive : bool Default is `False` subsequence : bool, optional `True` if it's not needed for the exact word be detected and larger strings that contain the given one are fine. If the query is a sentences with multiple words, it'll be considered for each word, not the whole sentence. Default is `False`. supersequence : bool, optional `True` if it's not needed for the exact word be detected and smaller strings that are contained within the given one are fine. If the query is a sentences with multiple words, it'll be considered for each word, not the whole sentence. Default is `False`. anagram : bool, optional `True` if it's acceptable for a complete permutation of the word to be found. e.g. "abcde" would be acceptable for "edbac". If the query is a sentences with multiple words, it'll be considered for each word, not the whole sentence. Default is `False`. timing_error : None or float, optional Sometimes other words (almost always very small) would be detected between the words of the `query`. This parameter defines the timing difference/tolerance of the search. Default is 0.0 i.e. No timing error is tolerated. missing_word_tolerance : int, optional The number of words that can be missed within the result. For example, if the query is "Some random text" and the tolerance value is `1`, then "Some text" would be a valid response. Note that the first and last words cannot be missed. Also, there'll be an error if the value is more than the number of available words. For the example above, any value more than 1 would have given an error (since there's only one word i.e. "random" that can be missed) Default is 0. Returns ------- search_results : {str: {str: [(float, float)]}} A dictionary whose keys are queries and whose values are dictionaries whose keys are all the audiofiles in which the query is present and whose values are a list whose elements are 2-tuples whose first element is the starting second of the query and whose values are the ending second. e.g. {"apple": {"fruits.wav" : [(1.1, 1.12)]}} Raises ------ TypeError if `queries` is neither a list nor a str """


        search_gen_rest_of_kwargs = {
            "audio_basename": audio_basename,
            "case_sensitive": case_sensitive,
            "subsequence": subsequence,
            "supersequence": supersequence,
            "timing_error": timing_error,
            "anagram": anagram,
            "missing_word_tolerance": missing_word_tolerance}

        if not isinstance(queries, (list, str)):
            raise TypeError("Invalid query type.")
        if type(queries) is not list:
            queries = [queries]
        search_results = _PrettyDefaultDict(lambda: _PrettyDefaultDict(list))
        for query in queries:
            search_gen = self.search_gen(query=query,
                                         **search_gen_rest_of_kwargs)
            for search_result in search_gen:
                search_results[query][
                    search_result["File Name"]].append(search_result["Result"])
        return search_results