code: func getAccessibleDatastores(ctx context.Context, nodeVmDetail *NodeDetails, nodeManager *NodeManager) ([]*vclib.DatastoreInfo, error) {
  	accessibleDatastores, err := nodeVmDetail.vm.GetAllAccessibleDatastores(ctx)
  	if err != nil {
  		// Check if the node VM is not found which indicates that the node info in the node manager is stale.
  		// If so, rediscover the node and retry.
  		if vclib.IsManagedObjectNotFoundError(err) {
  			klog.V(4).Infof("error %q ManagedObjectNotFound for node %q. Rediscovering...", err, nodeVmDetail.NodeName)
  			err = nodeManager.RediscoverNode(convertToK8sType(nodeVmDetail.NodeName))
  			if err == nil {
  				klog.V(4).Infof("Discovered node %s successfully", nodeVmDetail.NodeName)
  				nodeInfo, err := nodeManager.GetNodeInfo(convertToK8sType(nodeVmDetail.NodeName))
  				if err != nil {
  					klog.V(4).Infof("error %q getting node info for node %+v", err, nodeVmDetail)
  					return nil, err
  				}
  
  				accessibleDatastores, err = nodeInfo.vm.GetAllAccessibleDatastores(ctx)
  				if err != nil {
  					klog.V(4).Infof("error %q getting accessible datastores for node %+v", err, nodeVmDetail)
  					return nil, err
  				}
  			} else {
  				klog.V(4).Infof("error %q rediscovering node %+v", err, nodeVmDetail)
  				return nil, err
  			}
  		} else {
  			klog.V(4).Infof("error %q getting accessible datastores for node %+v", err, nodeVmDetail)
  			return nil, err
  		}
  	}
  	return accessibleDatastores, nil
  }
docs: // Returns the accessible datastores for the given node VM.