code: def phrase_to_filename(self, phrase):
          
          # remove non-word characters
          name = re.sub(r"[^\w\s\.]", '', phrase.strip().lower())
          # replace whitespace with underscores
          name = re.sub(r"\s+", '_', name)
  
          return name + '.png'
docs: Convert phrase to normilized file name.