code: def testRoundtripMap(self):
      dataset = dataset_ops.Dataset.range(10).map(lambda x: x * x)
      variant = dataset_ops.to_variant(dataset)
      dataset = dataset_ops.from_variant(
          variant, dataset_ops.get_structure(dataset)
      )
      self.assertDatasetProduces(dataset, [x * x for x in range(10)])
      self.assertEqual(self.evaluate(dataset.cardinality()), 10)
  
file_path: tensorflow-upstream/tensorflow/python/data/experimental/kernel_tests/variant_test.py
imports: from absl.testing import parameterized
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.framework import combinations
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the VariantTest obj's underlying member method code with example usage: obj.testRoundtripMap() without return types