def _create_add_channel_response(channel_id, encoded_handshake,
                                 encoding=0, rejected=False):
    if encoding != 0 and encoding != 1:
        raise ValueError(encoding % 'Invalid encoding %d')

    first_byte = ((_MUX_OPCODE_ADD_CHANNEL_RESPONSE << 5) |
                  (rejected << 4) | encoding)
    block = (chr(first_byte) +
             _encode_channel_id(channel_id) +
             _encode_number(len(encoded_handshake)) +
             encoded_handshake)
    return block
dataset/ETHPy150Open google/pywebsocket/mod_pywebsocket/mux.py/_create_add_channel_response/swapped operands of `%`