code: def _build_dataset(self, probs, num_samples, options=None):
      datasets = [
          dataset_ops.Dataset.from_tensors(i).repeat(None)
          for i in range(len(probs))
      ]
      dataset = dataset_ops.Dataset.sample_from_datasets(
          datasets, probs, seed=1813
      )
      dataset = dataset.take(num_samples)
      if options:
          dataset = dataset.with_options(options)
      return dataset
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.compat import compat
  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.eager import def_function
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the SampleFromDatasetsCheckpointTest obj's underlying member method code with example usage: obj._build_dataset(probs, num_samples, options) and returns: dataset