docstr: Get TF Dataset.
  
  convert into a tensorflow.data.Dataset
docstr_tok: ["Get","TF","Dataset",".","convert","into","a","tensorflow.data.Dataset"]
code: def to_tf(self) -> "tf.data.Dataset":
      """Get TF Dataset.
  
      convert into a tensorflow.data.Dataset
      """
  
      def make_generator():  # pragma: no cover
          if not self._executed:
              self._execute()
              self._executed = True
  
          for i in range(len(self._tensors[0])):
              if len(self._tensors) == 1:
                  yield self.get_data(self._tensors[0], i)
              else:
                  yield tuple(
                      self.get_data(t, i) for t in self._tensors
                  )
  
      return tf.data.Dataset.from_generator(
          make_generator,
          output_types=self._output_types,
          output_shapes=self._output_shapes,
      )
  
file_path: mars/mars/learn/contrib/tensorflow/dataset.py
imports: import copy
  from typing import List, Tuple
  import pandas
  import numpy
  from ....None import execute
  from ....core.context import get_context
  from ....tensor.core import TENSOR_TYPE
  from ....dataframe.core import DATAFRAME_TYPE, SERIES_TYPE
  from ....utils import require_not_none, lazy_import
label_desc: Use image node_id 5 for calling the MarsDataset obj's underlying member method code with example usage: obj.to_tf() and returns: tf