code: def test_log_rotation_config(monkeypatch, ray_shutdown):
      # This test should be executed before any test that uses
      # the shared serve_instance, as environment variables
      # for log rotation need to be set before ray.init
      logger = logging.getLogger("ray.serve")
      max_bytes = 100
      backup_count = 3
      set_logging_config(monkeypatch, max_bytes, backup_count)
      ray.init(num_cpus=1)
  
      @serve.deployment
      class Handle:
          def __call__(self):
              handlers = logger.handlers
              res = {}
              for handler in handlers:
                  if isinstance(
                      handler, logging.handlers.RotatingFileHandler
                  ):
                      res["max_bytes"] = handler.maxBytes
                      res["backup_count"] = handler.backupCount
              return res
  
      handle = serve.run(Handle.bind())
      rotation_config = handle.remote().result()
      assert rotation_config["max_bytes"] == max_bytes
      assert rotation_config["backup_count"] == backup_count
  
imports: import io
  import json
  import logging
  import os
  import re
  import string
  import sys
  import time
  from contextlib import redirect_stderr
  import pytest
  import requests
  import starlette
  import ray
  import ray.util.state
  from ray import serve
  from ray._private.test_utils import wait_for_condition
  from ray.serve._private.common import ServeComponentType
  from ray.serve._private.constants import SERVE_LOG_EXTRA_FIELDS
  from ray.serve._private.logging_utils import ServeJSONFormatter, get_component_log_file_name, get_serve_logs_dir
label_desc: Use image node_id 4 for calling a global function with example usage: test_log_rotation_config(monkeypatch, ray_shutdown) and returns: res