code: func NewComparablePrincipal(principal *msp.MSPPrincipal) *ComparablePrincipal {
  	if principal == nil {
  		logger.Warning("Principal is nil")
  		return nil
  	}
  	cp := &ComparablePrincipal{
  		principal: principal,
  	}
  	switch principal.PrincipalClassification {
  	case msp.MSPPrincipal_ROLE:
  		return cp.ToRole()
  	case msp.MSPPrincipal_ORGANIZATION_UNIT:
  		return cp.ToOURole()
  	}
  	mapping := msp.MSPPrincipal_Classification_name[int32(principal.PrincipalClassification)]
  	logger.Warning("Received an unsupported principal type:", principal.PrincipalClassification, "mapped to", mapping)
  	return nil
  }
docs: // NewComparablePrincipal creates a ComparablePrincipal out of the given MSPPrincipal.
  // Returns nil if a failure occurs.