code: def test_mock_fs_gcs():
      with test_utils.MockFs():
          tf.io.gfile.makedirs("gs://bucket/dir/subdir")
          assert tf.io.gfile.exists("gs://bucket/dir")
          assert tf.io.gfile.exists("gs://bucket/dir/subdir")
  
          with tf.io.gfile.GFile("gs://bucket/dir/file.txt", "w") as f:
              f.write("Content of file")
  
          assert set(tf.io.gfile.listdir("gs://bucket/dir")) == {
              "file.txt",
              "subdir",
          }
  
          bs = "big" + "store"
  
          # Test
          # * gs
          # * absolute path
          # * relative path
          assert tf.io.gfile.glob("gs://bucket/*/file.txt") == [
              "gs://bucket/dir/file.txt",
          ]
          assert tf.io.gfile.glob(f"/{bs}/bucket/*/file.txt") == [
              f"/{bs}/bucket/dir/file.txt",
          ]
          assert tf.io.gfile.glob(f"{bs}/bucket/*/file.txt") == [
              f"{bs}/bucket/dir/file.txt",
          ]
  
file_path: datasets/tensorflow_datasets/testing/test_utils_test.py
imports: import pathlib
  import pytest
  import tensorflow
  from tensorflow_datasets.testing import test_case
  from tensorflow_datasets.testing import test_utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_mock_fs_gcs() without return types