code: func getDatastoresForEndpointVC(ctx context.Context, dc *vclib.Datacenter, sharedDsInfos []*vclib.DatastoreInfo) ([]*vclib.DatastoreInfo, error) {
  	var datastores []*vclib.DatastoreInfo
  	allDsInfoMap, err := dc.GetAllDatastores(ctx)
  	if err != nil {
  		return nil, err
  	}
  	for _, sharedDsInfo := range sharedDsInfos {
  		dsInfo, ok := allDsInfoMap[sharedDsInfo.Info.Url]
  		if ok {
  			datastores = append(datastores, dsInfo)
  		} else {
  			klog.V(4).Infof("Warning: Shared datastore with URL %s does not exist in endpoint VC", sharedDsInfo.Info.Url)
  		}
  	}
  	klog.V(9).Infof("Datastore from endpoint VC: %+v", datastores)
  	return datastores, nil
  }
docs: // Returns the datastores in the given datacenter by performing lookup based on datastore URL.