code: func readMachineState(node *etcd.Node) (mach machine.MachineState, err error) {
  	var metadata map[string]string
  
  	for _, obj := range node.Nodes {
  		if strings.HasSuffix(obj.Key, "/object") {
  			err = unmarshal(obj.Value, &mach)
  			if err != nil {
  				return
  			}
  		} else if strings.HasSuffix(obj.Key, "/metadata") {
  			// Load metadata into a separate map to avoid stepping on it when deserializing the object key
  			metadata = make(map[string]string, len(obj.Nodes))
  			for _, mdnode := range obj.Nodes {
  				metadata[path.Base(mdnode.Key)] = mdnode.Value
  			}
  		}
  	}
  
  	mach.Metadata = mergeMetadata(mach.Metadata, metadata)
  	return
  }
docs: // readMachineState reads machine state from an etcd node