code: def _check_path(self):
          "Immediately check if we can access path. Otherwise bail."
          if not path.isdir(self._path or '/'):
              raise OSError('Path {!r} is not a directory'.format(self._path)f _check_path(self):
          "Immediately check if we can access path. Otherwise bail."
          if not path.isdir(self._path or '/'):
              raise OSError('Path {!r} is not a directory'.format(self._path))
docs: Immediately check if we can access path. Otherwise bail.