code: def stream(self, name):
          
          if self.stream_name != "default":
              raise ValueError("Nested streams aren't supported")
          if self._streams.get(name) == None:
              self._streams[name] = History(self.fname, out_dir=self.out_dir,
                                            add_callback=self._add_callback, stream_name=name)
          return self._streams[name]
docs: Stream can be used to record different time series:
  
          run.history.stream("batch").add({"gradients": 1})