code: def testSampleFromDatasetsWithZeroWeight(self, weights_type):
      # Sampling stops when the second dataset is exhausted.
      weights = _get_weights_of_type(
          np.asarray([0.0, 1.0]), weights_type
      )
      datasets = [
          dataset_ops.Dataset.from_tensors(-1).repeat(2),
          dataset_ops.Dataset.from_tensors(1).repeat(2),
      ]
      sample_dataset = dataset_ops.Dataset.sample_from_datasets(
          datasets, weights=weights, stop_on_empty_dataset=True
      )
      self.assertDatasetProduces(
          sample_dataset, [1, 1], requires_initialization=True
      )
  
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 6 for calling the SampleFromDatasetsTest obj's underlying member method code with example usage: obj.testSampleFromDatasetsWithZeroWeight(weights_type) without return types