def set_write(policy, operation, key, bins)
      begin_cmd
      field_count = estimate_key_size(key, policy)

      bins.each do |bin|
        estimate_operation_size_for_bin(bin)
      end

      size_buffer

      write_header_with_policy(policy, 0, INFO2_WRITE, field_count, bins.length)
      write_key(key, policy)

      bins.each do |bin|
        write_operation_for_bin(bin, operation)
      end

      end_cmd
    end
def set_write(policy, operation, key, bins)
      begin_cmd
      field_count = estimate_key_size(key, policy)

      bins.each do |bin|
        estimate_operation_size_for_bin(bin)
      end

      size_buffer

      write_header_with_policy(policy, 0, INFO2_WRITE, field_count, bins.length)
      write_key(key, policy)

      bins.each do |bin|
        write_operation_for_bin(bin, operation)
      end

      end_cmd
    end
Writes the command for write operations