code: def generate_fake_dataset(num_examples: int):
      """Constructs a dataset generator object."""
  
      def _generator(self, *args, **kwargs):
          """Generate a fake dataset for testing."""
          del args
          del kwargs
  
          def gen():
              n_annotations = len(FAKE_ID)
              for i in range(num_examples):
                  yield generate_fake_example(
                      w=FAKE_W[i % n_annotations],
                      h=FAKE_H[i % n_annotations],
                      identifier=FAKE_ID[i % n_annotations],
                  )
  
          return tf.data.Dataset.from_generator(
              gen,
              output_types=self.info.features.dtype,
              output_shapes=self.info.features.shape,
          )
  
      return _generator
  
label_desc: Use image node_id 2 for calling a global function with example usage: generate_fake_dataset(num_examples) and returns: _generator, tf