code: func (n *NodeInfo) Clone() *NodeInfo {
  	clone := &NodeInfo{
  		node:                    n.node,
  		requestedResource:       n.requestedResource.Clone(),
  		nonzeroRequest:          n.nonzeroRequest.Clone(),
  		allocatableResource:     n.allocatableResource.Clone(),
  		taintsErr:               n.taintsErr,
  		TransientInfo:           n.TransientInfo,
  		memoryPressureCondition: n.memoryPressureCondition,
  		diskPressureCondition:   n.diskPressureCondition,
  		pidPressureCondition:    n.pidPressureCondition,
  		usedPorts:               make(HostPortInfo),
  		imageStates:             n.imageStates,
  		generation:              n.generation,
  	}
  	if len(n.pods) > 0 {
  		clone.pods = append([]*v1.Pod(nil), n.pods...)
  	}
  	if len(n.usedPorts) > 0 {
  		// HostPortInfo is a map-in-map struct
  		// make sure it's deep copied
  		for ip, portMap := range n.usedPorts {
  			clone.usedPorts[ip] = make(map[ProtocolPort]struct{})
  			for protocolPort, v := range portMap {
  				clone.usedPorts[ip][protocolPort] = v
  			}
  		}
  	}
  	if len(n.podsWithAffinity) > 0 {
  		clone.podsWithAffinity = append([]*v1.Pod(nil), n.podsWithAffinity...)
  	}
  	if len(n.taints) > 0 {
  		clone.taints = append([]v1.Taint(nil), n.taints...)
  	}
  	return clone
  }
docs: // Clone returns a copy of this node.