code: def has_role(user, roles):
      
      if user and user.is_superuser:
          return True
  
      if not isinstance(roles, list):
          roles = [roles]
  
      normalized_roles = []
      for role in roles:
          if not inspect.isclass(role):
              role = RolesManager.retrieve_role(role)
  
          normalized_roles.append(role)
  
      user_roles = get_user_roles(user)
  
      return any([role in user_roles for role in normalized_roles])
docs: Check if a user has any of the given roles.