code: def write_test_data(tmp_dir: str):
      for f in test_data:
          file_name = os.path.join(tmp_dir, f)
          os.makedirs(os.path.dirname(file_name), exist_ok=True)
          test_data[f].write(file_name)
  
file_path: tensorflow/tensorflow/python/tools/api/generator2/generator/generator_test.py
imports: import collections
  import os
  from absl.testing import absltest
  from absl.testing import parameterized
  from tensorflow.python.tools.api.generator2.generator import generator
  from tensorflow.python.tools.api.generator2.shared import exported_api
label_desc: Use image node_id 1 for calling a global function with example usage: write_test_data(tmp_dir) without return types