code: func (nm *NodeManager) GetNodeInfoWithNodeObject(node *v1.Node) (NodeInfo, error) {
  	nodeName := node.Name
  	getNodeInfo := func(nodeName string) *NodeInfo {
  		nm.nodeInfoLock.RLock()
  		nodeInfo := nm.nodeInfoMap[nodeName]
  		nm.nodeInfoLock.RUnlock()
  		return nodeInfo
  	}
  	nodeInfo := getNodeInfo(nodeName)
  	var err error
  	if nodeInfo == nil {
  		// Rediscover node if no NodeInfo found.
  		klog.V(4).Infof("No VM found for node %q. Initiating rediscovery.", nodeName)
  		err = nm.DiscoverNode(node)
  		if err != nil {
  			klog.Errorf("Error %q node info for node %q not found", err, nodeName)
  			return NodeInfo{}, err
  		}
  		nodeInfo = getNodeInfo(nodeName)
  	} else {
  		// Renew the found NodeInfo to avoid stale vSphere connection.
  		klog.V(4).Infof("Renewing NodeInfo %+v for node %q", nodeInfo, nodeName)
  		nodeInfo, err = nm.renewNodeInfo(nodeInfo, true)
  		if err != nil {
  			klog.Errorf("Error %q occurred while renewing NodeInfo for %q", err, nodeName)
  			return NodeInfo{}, err
  		}
  		nm.addNodeInfo(nodeName, nodeInfo)
  	}
  	return *nodeInfo, nil
  }
docs: // GetNodeInfoWithNodeObject returns a NodeInfo which datacenter, vm and vc server ip address.
  // This method returns an error if it is unable find node VCs and DCs listed in vSphere.conf
  // NodeInfo returned may not be updated to reflect current VM location.
  //
  // This method is a getter but it can cause side-effect of updating NodeInfo object.