def encode_request(username, password, uuid, owner_uuid, is_owner_connection, client_type, serialization_version):
    client_message = ClientMessage(payload_size=calculate_size(username, password, uuid, owner_uuid, is_owner_connection, client_type, serialization_version))
    client_message.set_message_type(REQUEST_TYPE)
    client_message.set_retryable(RETRYABLE)
    client_message.append_str(username)
    client_message.append_str(password)
    client_message.append_bool(uuid is None)
    if uuid is not None:
        client_message.append_str(uuid)
    client_message.append_bool(owner_uuid is None)
    if owner_uuid is not None:
        client_message.append_str(owner_uuid)
    client_message.append_bool(is_owner_connection)
    client_message.append_str(client_type)
    client_message.append_byte(serialization_version)
    client_message.update_frame_length()
    return client_message
We should only redirect to login if there was no urlpattern that
dataset/ETHPy150Open hazelcast/hazelcast-python-client/hazelcast/protocol/codec/client_authentication_codec.py/encode_request--crossover with--dataset/ETHPy150Open fusionbox/django-widgy/widgy/contrib/urlconf_include/tests.py/TestMiddleware.test_login_required_legit_404_shouldnt_redirect