code: def normalize_path(path):
      
      if path in ['//', '/', '']:
          return '/'
      npath = normpath(unquote(path, exceptions=QUOTE_EXCEPTIONS['path']))
      if path[-1] == '/' and npath != '/':
          npath += '/'
      return npath
docs: Normalize path: collapse etc.
  
      >>> normalize_path('/a/b///c')
      '/a/b/c'