code: def test_mock_gfile(tmp_path: pathlib.Path):
      with hg_wrapper.mock_builtin_to_use_gfile():
          with open(tmp_path / "test.txt", "w") as f:
              f.write("hello!\n")
  
imports: import pathlib
  import tensorflow
  from tensorflow_datasets.core.community import huggingface_wrapper
label_desc: Use image node_id 2 for calling a global function with example usage: test_mock_gfile(tmp_path) without return types