<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_empty(fs, path):
 # type: (FS, Text) -> None """Remove all empty parents. Arguments: fs (FS):
 A filesystem instance. path (str):
 Path to a directory on the filesystem. """

    path = abspath(normpath(path))
    try:
        while path not in ("", "/"):
            fs.removedir(path)
            path = dirname(path)
    except DirectoryNotEmpty:
        pass