class_docstr: Dataset scheduling for multiple problems.
class_docstr_tok: ["Dataset","scheduling","for","multiple","problems","."]
docstr: Returns a dataset containing examples from multiple problems.
  
  Args:
    mode: A member of problem.DatasetSplit.
    hparams: A tf.HParams object, the model hparams.
    global_step: A scalar tensor used to compute the sampling distribution.
      If global_step is None, we call tf.train.get_or_create_global_step by
      default.
    **kwargs: Keywords for problem.Problem.Dataset.
  
  Returns:
    A dataset containing examples from multiple problems.
docstr_tok: ["Returns","a","dataset","containing","examples","from","multiple","problems",".","Args",":","mode",":","A","member","of","problem.DatasetSplit",".","hparams",":","A","tf.HParams","object",",","the","model","hparams",".","global_step",":","A","scalar","tensor","used","to","compute","the","sampling","distribution",".","If","global_step","is","None",",","we","call","tf.train.get_or_create_global_step","by","default",".","*","*","kwargs",":","Keywords","for","problem.Problem.Dataset",".","Returns",":","A","dataset","containing","examples","from","multiple","problems","."]
code: def dataset(self, mode, hparams=None, global_step=None, **kwargs):
      """Returns a dataset containing examples from multiple problems.
  
      Args:
        mode: A member of problem.DatasetSplit.
        hparams: A tf.HParams object, the model hparams.
        global_step: A scalar tensor used to compute the sampling distribution.
          If global_step is None, we call tf.train.get_or_create_global_step by
          default.
        **kwargs: Keywords for problem.Problem.Dataset.
  
      Returns:
        A dataset containing examples from multiple problems.
      """
      datasets = [p.dataset(mode, **kwargs) for p in self.problems]
      datasets = [
          d.map(
              lambda x, i=j: self.normalize_example(  # pylint: disable=g-long-lambda
                  dict(x, problem_id=tf.constant([i])), hparams
              )
          )
          for j, d in enumerate(
              datasets
          )  # Tag examples with a problem_id.
      ]
      if mode is problem.DatasetSplit.TRAIN:
          if global_step is None:
              global_step = tf.train.get_or_create_global_step()
          pmf = get_schedule_distribution(self.schedule, global_step)
          return get_multi_dataset(datasets, pmf)
      elif self.only_eval_first_problem:
          return datasets[0]
      else:
          datasets = [d.repeat() for d in datasets]
          return tf.data.Dataset.zip(tuple(datasets)).flat_map(
              lambda *x: functools.reduce(  # pylint: disable=g-long-lambda
                  tf.data.Dataset.concatenate,
                  map(tf.data.Dataset.from_tensors, x),
              )
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import os
  import numpy
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_problems
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling the MultiProblemV2 obj's underlying member method code with example usage: obj.dataset(mode, hparams, global_step) and returns: get_multi_dataset, datasets, tf