code: def test_rate_limited_queue(mock_sleep):
      sleeps = []
      mock_sleep.side_effect = lambda sleep_time: sleeps.append(
          sleep_time
      )
  
      mock_queue = mock.MagicMock()
  
      mock_queue.name = "inner_queue"
      mock_queue.default_timeout = 10.0
  
      rate_limited_queue = RateLimitedQueue(
          mock_queue, requests_per_second=1
      )
  
      assert rate_limited_queue.name == "inner_queue"
      assert rate_limited_queue.default_timeout == 10.0
  
      timeout = time.perf_counter() + 1
      while time.perf_counter() + sum(sleeps) < timeout:
          rate_limited_queue.get()
  
      assert mock_queue.get.call_count == 2
  
imports: import base64
  import multiprocessing
  import pickle
  import queue
  import time
  from unittest import mock
  import pytest
  import requests_mock
  from lightning.app import LightningFlow
  from lightning.app.core import queues
  from lightning.app.core.constants import HTTP_QUEUE_URL, STATE_UPDATE_TIMEOUT
  from lightning.app.core.queues import READINESS_QUEUE_CONSTANT, BaseQueue, HTTPQueue, QueuingSystem, RateLimitedQueue, RedisQueue
  from lightning.app.utilities.imports import _is_redis_available
  from lightning.app.utilities.redis import check_if_redis_running
label_desc: Use image node_id 11 for calling a global function with example usage: test_rate_limited_queue(mock_sleep) without return types