code: def testSampleFromDatasetsCardinality(self):
      ds1 = dataset_ops.Dataset.from_tensors([1.0]).repeat()
      ds2 = dataset_ops.Dataset.from_tensors([2.0]).repeat()
      ds = dataset_ops.Dataset.sample_from_datasets([ds1, ds2])
      self.assertEqual(
          self.evaluate(ds.cardinality()), dataset_ops.INFINITE
      )
  
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 10 for calling the SampleFromDatasetsTest obj's underlying member method code with example usage: obj.testSampleFromDatasetsCardinality() without return types