def _send_reject_data(self, event: RejectData) -> bytes:
    if (self.state != ConnectionState.REJECTING):
        raise LocalProtocolError('Cannot send rejection data in state {}'.format(self.state))
    data = self._h11_connection.send(h11.Data(data=event.data))
    if event.body_finished:
        data += self._h11_connection.send(h11.EndOfMessage())
        self._state = ConnectionState.CLOSED
    return data
def _send_reject_data(self, event: RejectData) -> bytes:
    if (self.state != ConnectionState.REJECTING):
        raise LocalProtocolError('Cannot send rejection data in state {}'.format(self.state))
    data = self._h11_connection.send(h11.Data(data=event.data))
    if event.body_finished:
        data += self._h11_connection.send(h11.EndOfMessage())
        self._state = ConnectionState.CLOSED
    return data