code: def _prefix_is_authorized(self, path):
          
          path = os.path.abspath(path)
          while True:
              if path in self._prefixes:
                  return True
              if path == '/':
                  break
              path = os.path.dirname(path)
          return False
docs: Return the set of all possible directory prefixes for `path`.
          :func:`os.path.abspath` is used to ensure the path is absolute.
  
          :param str path:
              The path.
          :returns: Set of prefixes.