code: def _generate_data(split):
      """Generate images archive."""
  
      # Generate images
      images_dir = os.path.join(_output_dir(), "images", split)
      if not tf.io.gfile.exists(images_dir):
          tf.io.gfile.makedirs(images_dir)
      for i in range(_IMAGE_NUMBERS[split]):
          image_name = "CLEVR_{}_{:06d}.png".format(split, i)
          tf.io.gfile.copy(
              fake_data_utils.get_random_png(),
              os.path.join(images_dir, image_name),
              overwrite=True,
          )
  
      if split in ["train", "val"]:
          # Generate annotations
          scenes_dir = os.path.join(_output_dir(), "scenes")
          if not tf.io.gfile.exists(scenes_dir):
              tf.io.gfile.makedirs(scenes_dir)
  
          annotations = {
              "scenes": [
                  {
                      "objects": [
                          {
                              "color": "red",
                              "shape": "sphere",
                              "size": "small",
                              "material": "rubber",
                              "3d_coords": [0.0, 0.0, 0.0],
                              "pixel_coords": [0.0, 0.0, 0.0],
                              "rotation": 0.0,
                          }
                      ]
                      * _NUM_OBJECTS
                  }
              ]
              * _IMAGE_NUMBERS[split]
          }
  
          annotations_file = os.path.join(
              scenes_dir, "CLEVR_{}_scenes.json".format(split)
          )
          with tf.io.gfile.GFile(annotations_file, "w") as f:
              json.dump(annotations, f)
  
file_path: datasets/tensorflow_datasets/testing/fake_data_generation/clevr.py
imports: import json
  import os
  from absl import app
  from absl import flags
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  from tensorflow_datasets.testing import fake_data_utils
label_desc: Use image node_id 2 for calling a global function with example usage: _generate_data(split) without return types