code: func (psbc principalSetsByCollectionName) toIdentityFilter(channel string, evaluator principalEvaluator, cc *ChaincodeCall) (identityFilter, error) {
  	var principalSets policies.PrincipalSets
  	for _, col := range cc.CollectionNames {
  		// Each collection we're interested in should exist in the principalSetsByCollectionName mapping.
  		// Otherwise, we have no way of computing a filter because we can't locate the principals the peer identities
  		// need to satisfy.
  		principalSet, exists := psbc[col]
  		if !exists {
  			return nil, errors.Errorf("collection %s doesn't exist in collection config for chaincode %s", col, cc.Name)
  		}
  		principalSets = append(principalSets, principalSet)
  	}
  	return filterForPrincipalSets(channel, evaluator, principalSets), nil
  }
docs: // toIdentityFilter converts this principalSetsByCollectionName mapping to a filter
  // which accepts or rejects identities of peers.