code: def _save_image(jpeg, label, image_idx):
      """Saves jpeg."""
      dirname = os.path.join(_output_dir(), label)
      if not os.path.exists(dirname):
          os.makedirs(dirname)
      path = os.path.join(dirname, "image_{:04d}.jpg".format(image_idx))
      with open(path, "wb") as out_file:
          out_file.write(jpeg)
  
file_path: datasets/tensorflow_datasets/testing/fake_data_generation/caltech.py
imports: import os
  from absl import app
  from absl import flags
  import numpy
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  from tensorflow_datasets.image_classification import caltech
  import tensorflow_datasets.public_api
  from tensorflow_datasets.testing import fake_data_utils
label_desc: Use image node_id 2 for calling a global function with example usage: _save_image(jpeg, label, image_idx) without return types