class_docstr: Base class for translation problems.
class_docstr_tok: ["Base","class","for","translation","problems","."]
code: def generate_samples(
      self,
      data_dir,
      tmp_dir,
      dataset_split,
      custom_iterator=text_problems.text2text_txt_iterator,
  ):
      datasets = self.source_data_files(dataset_split)
      tag = "dev"
      datatypes_to_clean = None
      if dataset_split == problem.DatasetSplit.TRAIN:
          tag = "train"
          datatypes_to_clean = self.datatypes_to_clean
      data_path = compile_data(
          tmp_dir,
          datasets,
          "%s-compiled-%s" % (self.name, tag),
          datatypes_to_clean=datatypes_to_clean,
      )
  
      return custom_iterator(data_path + ".lang1", data_path + ".lang2")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gzip
  import os
  import tarfile
  import zipfile
  from tensor2tensor.data_generators import cleaner_en_xx
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.utils import bleu_hook
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import mlperf_log
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling the TranslateProblem obj's underlying member method code with example usage: obj.generate_samples(data_dir, tmp_dir, dataset_split, custom_iterator) and returns: custom_iterator