<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _match_files_flat_hierarchy(self, text_files, audio_files):
 """ Match audio and text files in flat hierarchies. Two files match if their names, once removed the file extension, are the same. Examples: :: foo/text/a.txt foo/audio/a.mp3 => match: ["a", "foo/text/a.txt", "foo/audio/a.mp3"] foo/text/a.txt foo/audio/b.mp3 => no match foo/res/c.txt foo/res/c.mp3 => match: ["c", "foo/res/c.txt", "foo/res/c.mp3"] foo/res/d.txt foo/res/e.mp3 => no match :param list text_files: the entries corresponding to text files :param list audio_files: the entries corresponding to audio files :rtype: list of lists (see above) """

        self.log(u"Matching files in flat hierarchy")
        self.log([u"Text files: '%s'", text_files])
        self.log([u"Audio files: '%s'", audio_files])
        d_text = {}
        d_audio = {}
        for text_file in text_files:
            text_file_no_ext = gf.file_name_without_extension(text_file)
            d_text[text_file_no_ext] = text_file
            self.log([u"Added text file '%s' to key '%s'", text_file, text_file_no_ext])
        for audio_file in audio_files:
            audio_file_no_ext = gf.file_name_without_extension(audio_file)
            d_audio[audio_file_no_ext] = audio_file
            self.log([u"Added audio file '%s' to key '%s'", audio_file, audio_file_no_ext])
        tasks = []
        for key in d_text.keys():
            self.log([u"Examining text key '%s'", key])
            if key in d_audio:
                self.log([u"Key '%s' is also in audio", key])
                tasks.append([key, d_text[key], d_audio[key]])
                self.log([u"Added pair ('%s', '%s')", d_text[key], d_audio[key]])
        return tasks