code: def generate_data(self, data_dir, tmp_dir, task_id=-1):
      train_paths = self.training_filepaths(data_dir, 1, shuffled=True)
      dev_paths = self.dev_filepaths(data_dir, 1, shuffled=True)
      generator_utils.generate_files(
          self.generator(data_dir, tmp_dir, True), train_paths
      )
      generator_utils.generate_files(
          self.generator(data_dir, tmp_dir, False), dev_paths
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tempfile
  import numpy
  from six.moves import range
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import data_reader
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 2 for calling the TestProblem obj's underlying member method code with example usage: obj.generate_data(data_dir, tmp_dir, task_id) without return types