code: func (cp *ComparablePrincipal) ToRole() *ComparablePrincipal {
  	mspRole := &msp.MSPRole{}
  	err := proto.Unmarshal(cp.principal.Principal, mspRole)
  	if err != nil {
  		logger.Warning("Failed unmarshaling principal:", err)
  		return nil
  	}
  	cp.mspID = mspRole.MspIdentifier
  	cp.role = mspRole
  	return cp
  }
docs: // ToRole converts this ComparablePrincipal to MSP Role, and returns nil if the conversion failed