code: def train_by_stream(self, stream: StreamWrapper) -> None:
          
          self._run_epoch(stream=stream, train=True)
docs: Train the model with the given stream.
  
          :param stream: stream to train with