code: def test_num_replicas_not_above_max_replicas(*_):
      """Test self.num_replicas doesn't exceed max_replicas."""
      max_replicas = 6
      auto_scaler = AutoScaler1(
          EmptyWork,
          min_replicas=1,
          max_replicas=max_replicas,
          scale_out_interval=0.001,
          scale_in_interval=0.001,
      )
  
      for _ in range(max_replicas + 1):
          time.sleep(0.002)
          auto_scaler.run()
  
      assert auto_scaler.num_replicas == max_replicas
  
imports: import time
  import uuid
  from unittest import mock
  from unittest.mock import patch
  import pytest
  from fastapi import HTTPException
  from lightning.app import CloudCompute, LightningWork
  from lightning.app.components import AutoScaler, ColdStartProxy, Text
  from lightning.app.components.serve.auto_scaler import _LoadBalancer
label_desc: Use image node_id 1 for calling a global function with example usage: test_num_replicas_not_above_max_replicas() without return types