code: def write_to_stream(self, stream_id, data, sandbox=None):
          
          if sandbox is not None:
              raise NotImplementedError
  
          if stream_id not in self.streams:
              raise StreamNotFoundError("Stream with id '{}' does not exist".format(stream_id))
  
          writer = self.get_stream_writer(self.streams[stream_id])
  
          if isinstance(data, StreamInstance):
              data = [data]
  
          for instance in data:
              if not isinstance(instance, StreamInstance):
                  raise ValueError("Expected StreamInstance, got {}".format(str(type(instance))))
              writer(instance)
docs: Write to the stream
  
          :param stream_id: The stream identifier
          :param data: The stream instances
          :param sandbox: The sandbox for this stream
          :type stream_id: StreamId
          :return: None
          :raises: NotImplementedError