code: def sanitize(value):
      
  
      value = unicodedata.normalize('NFKD', value)
      value = value.strip()
      value = re.sub('[^./\w\s-]', '', value)
      value = re.sub('[-\s]+', '-', value)
  
      return value
docs: Strips all undesirable characters out of potential file paths.