old_contents: """
  Some small file related utilities
  """
  
  import string
  import unicodedata
  
  validFilenameChars = "-_.() %s%s" % (string.ascii_letters, string.digits)
  
  
  def sanitize_filename(filename):
      cleanedFilename = unicodedata.normalize('NFKD', filename).encode('ASCII', 'ignore').lower()
      return ''.join(c for c in cleanedFilename if c in validFilenameChars).replace(' ', '_')
      
  
new_contents: """
  Some small file related utilities
  """
  import os
  from django.template.defaultfilters import slugify
  
  
  def sanitize_filename(uncleaned_filename):
      fileName, fileExtension = os.path.splitext(uncleaned_filename)
      cleanedFilename = slugify(fileName)
      return (cleanedFilename + fileExtension).replace('-', '_')
subject: update of sanitize_name function