code: def permissions(self, perms):
          
  
          if not isinstance(perms, (list, tuple)):
              perms = [perms]
  
          instances = []
  
          for perm in perms:
              if isclass(perm):
                  instances.append(perm())
              else:
                  instances.append(perm)
  
          def decorator(func):
              func.permissions = instances
              return func
          return decorator
docs: A decorator that sets a list of permissions for a function.
  
          :param perms: The list of permission instances or classes.
          :return: A function