code: def encode_request(timeout, durability, transaction_type, thread_id):
      
      client_message = ClientMessage(payload_size=calculate_size(timeout, durability, transaction_type, thread_id))
      client_message.set_message_type(REQUEST_TYPE)
      client_message.set_retryable(RETRYABLE)
      client_message.append_long(timeout)
      client_message.append_int(durability)
      client_message.append_int(transaction_type)
      client_message.append_long(thread_id)
      client_message.update_frame_length()
      return client_message
docs: Encode request into client_message