code: def translate_path(self, path):
          
          # abandon query parameters
          path = path.split('?', 1)[0]
          path = path.split('#', 1)[0]
          # Don't forget explicit trailing slash when normalizing. Issue17324
          trailing_slash = path.rstrip().endswith('/')
          path = posixpath.normpath(urllib.parse.unquote(path))
          words = path.split('/')
          words = [_f for _f in words if _f]
          path = self.base_path
          for word in words:
              _, word = os.path.splitdrive(word)
              _, word = os.path.split(word)
              if word in (os.curdir, os.pardir):
                  continue
              path = os.path.join(path, word)
          if trailing_slash:
              path += '/'
          return path
docs: Translate a /-separated PATH to the local filename syntax.
  
          Components that mean special things to the local file system
          (e.g. drive or directory names) are ignored.  (XXX They should
          probably be diagnosed.)