code: def testSampleFromDatasetsNested(self):
      ds1 = dataset_ops.Dataset.range(10).window(2)
      ds2 = dataset_ops.Dataset.range(10, 20).window(2)
      ds = dataset_ops.Dataset.sample_from_datasets(
          [ds1, ds2], weights=[0.3, 0.7]
      )
      ds = ds.flat_map(lambda x: x)
      next_element = self.getNext(ds, requires_initialization=True)
      self.evaluate(next_element())
  
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 11 for calling the SampleFromDatasetsTest obj's underlying member method code with example usage: obj.testSampleFromDatasetsNested() without return types