code: def _build_dataset(
      self, num_datasets, num_elements_per_dataset, options=None
  ):
      datasets = [
          dataset_ops.Dataset.range(num_elements_per_dataset)
          for _ in range(num_datasets)
      ]
      indices = []
      for i in range(num_datasets):
          indices = indices + ([i] * num_elements_per_dataset)
      shuffled_indices = stateless_random_ops.stateless_shuffle(
          np.int64(indices), seed=[1, 2]
      )
      choice_dataset = dataset_ops.Dataset.from_tensor_slices(
          shuffled_indices
      )
      dataset = dataset_ops.Dataset.choose_from_datasets(
          datasets, choice_dataset
      )
      if options:
          dataset = dataset.with_options(options)
      return dataset
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the ChooseFromDatasetsCheckpointTest obj's underlying member method code with example usage: obj._build_dataset(num_datasets, num_elements_per_dataset, options) and returns: dataset