code: def rate_limit(limit: int, key=None):
      
  
      def decorator(func):
          setattr(func, 'throttling_rate_limit', limit)
          if key:
              setattr(func, 'throttling_key', key)
          return func
  
      return decorator
docs: Decorator for configuring rate limit and key in different functions.
  
      :param limit:
      :param key:
      :return: