<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def manage_fs( self, fs_url, # type: Union[FS, Text] create=False, # type: bool writeable=False, # type: bool cwd=".", # type: Text ):
 """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: This function may be used in two ways. You may either pass a ``str``, as follows:: Or, an filesystem instance:: """

        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()