code: def check_role(self, role_ids, logical_operator=all):
          
          if self.authorized:
              self.security_manager.check_role(self.identifiers,
                                               role_ids,
                                               logical_operator)
          else:
              msg = 'Cannot check permission when identifiers aren\'t set!'
              raise ValueError(msg)
docs: :param role_ids:  1 or more RoleIds
          :type role_ids: a Set of Strings
  
          :param logical_operator:  indicates whether all or at least one
                                    permission check is true (any)
          :type: any OR all (from python stdlib)
  
          :raises UnauthorizedException: if Subject not assigned to all roles