class_docstr: Records demonstrations.
  
  A demonstration is a (observation, action, reward, discount) tuple where
  every element is a numpy array corresponding to a full episode.
class_docstr_tok: ["Records","demonstrations",".","A","demonstration","is","a","(","observation",",","action",",","reward",",","discount",")","tuple","where","every","element","is","a","numpy","array","corresponding","to","a","full","episode","."]
code: def make_tf_dataset(self):
      types = tree.map_structure(lambda x: x.dtype, self._demos[0])
      shapes = tree.map_structure(lambda x: x.shape, self._demos[0])
      ds = tf.data.Dataset.from_generator(
          lambda: self._demos, types, shapes
      )
      return ds.repeat().shuffle(len(self._demos))
  
imports: from typing import Any, List
  from absl import flags
  from bsuite.environments import deep_sea
  import dm_env
  import numpy
  import tensorflow
  import tree
label_desc: Use image node_id 7 for calling the DemonstrationRecorder obj's underlying member method code with example usage: obj.make_tf_dataset() and returns: ds