docs: def _remove_accents(filename):
      """
      Function that will try to remove accents from a unicode string to be used in a filename.
      input filename should be either an ascii or unicode string
      """
      # noinspection PyBroadException
      try:
          filename = filename.replace(" ", "_")
          if isinstance(filename, type(six.u(''))):
              unicode_filename = filename
          else:
              unicode_filename = six.u(filename)
          cleaned_filename = unicodedata.normalize('NFKD', unicode_filename).encode('ASCII', 'ignore').decode('ASCII')
  
          cleaned_filename = re.sub(r'[^\w\s-]', '', cleaned_filename.strip().lower())
          cleaned_filename = re.sub(r'[-\s]+', '-', cleaned_filename)
  
          return cleaned_filename
      except:
          traceback.print_exc()
          return filename