code: def testArbitraryReaderFuncFromDatasetGenerator(self):
      def my_generator():
          yield (1, [1] * 10)
  
      def gen_dataset(dummy):
          return dataset_ops.Dataset.from_generator(
              my_generator,
              (dtypes.int64, dtypes.int64),
              (
                  tensor_shape.TensorShape([]),
                  tensor_shape.TensorShape([10]),
              ),
          )
  
      dataset = datasets.StreamingFilesDataset(
          dataset_ops.Dataset.range(10), filetype=gen_dataset
      )
  
      with ops.device(self._worker_device):
          iterator = dataset_ops.make_initializable_iterator(dataset)
      self._sess.run(iterator.initializer)
      get_next = iterator.get_next()
  
      retrieved_values = self._sess.run(get_next)
  
      self.assertIsInstance(retrieved_values, (list, tuple))
      self.assertEqual(len(retrieved_values), 2)
      self.assertEqual(retrieved_values[0], 1)
      self.assertItemsEqual(retrieved_values[1], [1] * 10)
  
imports: import os
  from tensorflow.core.protobuf import cluster_pb2
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import readers
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.lib.io import python_io
  from tensorflow.python.platform import test
  from tensorflow.python.tpu import datasets
  from tensorflow.python.training import server_lib
  from tensorflow.python.util import compat
label_desc: Use image node_id 6 for calling the DatasetsTest obj's underlying member method code with example usage: obj.testArbitraryReaderFuncFromDatasetGenerator() and returns: dataset_ops