code: def mock_raw_data(
      tmp_dir, raw_dim=1024, num_channels=3, num_images=1
  ):
      """Mock a raw data download directory with meta and raw subdirs.
  
      Notes:
  
        * This utility is shared by tests in both allen_brain_utils and
          allen_brain so kept here instead of in one of *_test.
  
      Args:
        tmp_dir: str, temporary dir in which to mock data.
        raw_dim: int, the x and y dimension of generated raw imgs.
        num_channels: int, number of channels in image.
        num_images: int, number of images to mock.
      """
  
      tf.gfile.MakeDirs(tmp_dir)
  
      for image_id in range(num_images):
          raw_image_path = os.path.join(tmp_dir, "%s.jpg" % image_id)
  
          mock_raw_image(
              x_dim=raw_dim,
              y_dim=raw_dim,
              num_channels=num_channels,
              output_path=raw_image_path,
          )
  
imports: import os
  import shutil
  import tempfile
  import numpy
  from tensor2tensor.data_generators import allen_brain
  from tensor2tensor.models import image_transformer_2d
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 2 for calling a global function with example usage: mock_raw_data(tmp_dir, raw_dim, num_channels, num_images) without return types