code: def mock_fs() -> Iterator[testing.MockFs]:
      """Patch `tf.io.gfile` API into a virtual file system."""
      from tensorflow_datasets import (
          testing,
      )  # pylint: disable=g-import-not-at-top
  
      with testing.MockFs() as fs:
          yield fs
  
file_path: datasets/tensorflow_datasets/conftest.py
imports: from __future__ import annotations
  import builtins
  import importlib
  import sys
  import typing
  from typing import Iterator, Type
  import pytest
  from tensorflow_datasets import setup_teardown
label_desc: Use image node_id 3 for calling a global function with example usage: mock_fs() without return types