code: func (pbmClient *PbmClient) GetCompatibleDatastores(ctx context.Context, dc *Datacenter, storagePolicyID string, datastores []*DatastoreInfo) ([]*DatastoreInfo, string, error) {
  	var (
  		dsMorNameMap                                = getDsMorNameMap(ctx, datastores)
  		localizedMessagesForNotCompatibleDatastores = ""
  	)
  	compatibilityResult, err := pbmClient.GetPlacementCompatibilityResult(ctx, storagePolicyID, datastores)
  	if err != nil {
  		klog.Errorf("Error occurred while retrieving placement compatibility result for datastores: %+v with storagePolicyID: %s. err: %+v", datastores, storagePolicyID, err)
  		return nil, "", err
  	}
  	compatibleHubs := compatibilityResult.CompatibleDatastores()
  	var compatibleDatastoreList []*DatastoreInfo
  	for _, hub := range compatibleHubs {
  		compatibleDatastoreList = append(compatibleDatastoreList, getDatastoreFromPlacementHub(datastores, hub))
  	}
  	for _, res := range compatibilityResult {
  		for _, err := range res.Error {
  			dsName := dsMorNameMap[res.Hub.HubId]
  			localizedMessage := ""
  			if err.LocalizedMessage != "" {
  				localizedMessage = "Datastore: " + dsName + " not compatible with the storage policy. LocalizedMessage: " + err.LocalizedMessage + "\n"
  			} else {
  				localizedMessage = "Datastore: " + dsName + " not compatible with the storage policy. \n"
  			}
  			localizedMessagesForNotCompatibleDatastores += localizedMessage
  		}
  	}
  	// Return an error if there are no compatible datastores.
  	if len(compatibleHubs) < 1 {
  		klog.Errorf("No compatible datastores found that satisfy the storage policy requirements: %s", storagePolicyID)
  		return nil, localizedMessagesForNotCompatibleDatastores, fmt.Errorf("No compatible datastores found that satisfy the storage policy requirements")
  	}
  	return compatibleDatastoreList, localizedMessagesForNotCompatibleDatastores, nil
  }
docs: // GetCompatibleDatastores filters and returns compatible list of datastores for given storage policy id
  // For Non Compatible Datastores, fault message with the Datastore Name is also returned