code: def manage_fs(
          self,
          fs_url,  # type: Union[FS, Text]
          create=False,  # type: bool
          writeable=False,  # type: bool
          cwd=".",  # type: Text
      ):
          # type: (...) -> Iterator[FS]
          
          from ..base import FS
  
          if isinstance(fs_url, FS):
              yield fs_url
          else:
              _fs = self.open_fs(fs_url, create=create, writeable=writeable, cwd=cwd)
              try:
                  yield _fs
              except:
                  raise
              finally:
                  _fs.close()
docs: Get a context manager to open and close a filesystem.
  
          Arguments:
              fs_url (FS or str): A filesystem instance or a FS URL.
              create (bool, optional): If `True`, then create the filesystem if
                  it doesn't already exist.
              writeable (bool, optional): If `True`, then the filesystem
                  must be writeable.
              cwd (str): The current working directory, if opening a
                  `~fs.osfs.OSFS`.
  
          Sometimes it is convenient to be able to pass either a FS object
          *or* an FS URL to a function. This context manager handles the
          required logic for that.
  
          Example:
              >>> def print_ls(list_fs):
              ...     '''List a directory.'''
              ...     with manage_fs(list_fs) as fs:
              ...         print(' '.join(fs.listdir()))
  
              This function may be used in two ways. You may either pass
              a ``str``, as follows::
  
                  >>> print_list('zip://projects.zip')
  
              Or, an filesystem instance::
  
                  >>> from fs.osfs import OSFS
                  >>> projects_fs = OSFS('~/')
                  >>> print_list(projects_fs)