code: func putTxn(db keyval.ProtoBroker, data string) {
  	contacts := []phonebook.Contact{}
  
  	json.Unmarshal([]byte(data), &contacts)
  
  	txn := db.NewTxn()
  
  	for i := range contacts {
  
  		key := phonebook.EtcdContactPath(&contacts[i])
  		fmt.Println("Saving ", key)
  		//add the key-value pair into transaction
  		txn.Put(key, &contacts[i])
  	}
  
  	txn.Commit(context.Background())
  
  }
docs: // putTxn demonstrates the use of NewTxn() and Commit() APIs to create multiple
  // contacts in the database in one transaction.