import fsspec


def get_fs(path: str) -> fsspec.AbstractFileSystem:
    """Return the fsspec filesystem required to handle a given path."""
    fs, _, _ = fsspec.get_fs_token_paths(path)
    return fs