code: def calculate_size(name, txn_id, thread_id, key, old_value, new_value):
      
      data_size = 0
      data_size += calculate_size_str(name)
      data_size += calculate_size_str(txn_id)
      data_size += LONG_SIZE_IN_BYTES
      data_size += calculate_size_data(key)
      data_size += calculate_size_data(old_value)
      data_size += calculate_size_data(new_value)
      return data_size
docs: Calculates the request payload size