code: def _remove_accents_(filename):
      
      if isinstance(filename, type(six.u(''))):
          unicode_filename = filename
      else:
          unicode_filename = six.u(filename)
      valid_characters = bytes(b'-_.() 1234567890abcdefghijklmnopqrstuvwxyz')
      cleaned_filename = unicodedata.normalize('NFKD', unicode_filename).encode('ASCII', 'ignore')
  
      new_filename = six.u('')
  
      for char_int in bytes(cleaned_filename):
          char_byte = bytes([char_int])
          if char_byte in valid_characters:
              new_filename += char_byte.decode()
  
      return new_filename
docs: 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