

def end_stream(self, stream_id):
    '\n        Cleanly end a given stream.\n\n        This method ends a stream by sending an empty DATA frame on that stream\n        with the ``END_STREAM`` flag set.\n\n        :param stream_id: The ID of the stream to end.\n        :type stream_id: ``int``\n        :returns: Nothing\n        '
    self.state_machine.process_input(ConnectionInputs.SEND_DATA)
    frames = self.streams[frames].end_stream()
    self._prepare_for_sending(frames)

dataset/ETHPy150Open python-hyper/hyper-h2/h2/connection.py H2Connection.end_stream/VarMisuse@31/152 `stream_id`->`frames`