code: func formatNodeName(labels map[string]string, job string) string {
  	// Get the host name of the test node.
  	node := labels["node"]
  	// Check if we already have the formatted name.
  	if formatted, ok := nodeNameCache[node]; ok {
  		return formatted
  	}
  
  	// The labels contains image and machine capacity info.
  	image, okImage := labels["image"]
  	machine, okMachine := labels["machine"]
  
  	if okImage && okMachine {
  		str := image + "_" + machine
  		nodeNameCache[node] = str
  		return str
  	}
  
  	// Can not find image/machine in the labels. Extract machine/image info
  	// from host name "machine-image-uuid" (to be deprecated)
  	parts := strings.Split(node, "-")
  	lastPart := len(parts) - 1
  
  	machine = parts[0] + "-" + parts[1] + "-" + parts[2]
  
  	result := ""
  	for _, part := range parts[3:lastPart] {
  		result += part + "-"
  	}
  
  	image = result[:len(result)-1]
  	str := image + "_" + machine
  	nodeNameCache[node] = str
  	return str
  }
docs: // formatNodeName gets fromatted node name (image_machineCapacity) from labels of test data.