code: def test_access_log(self, serve_and_ray_shutdown, enable_access_log):
      logger = logging.getLogger("ray.serve")
  
      @serve.deployment(
          logging_config={"enable_access_log": enable_access_log}
      )
      class Model:
          def __call__(self, req: starlette.requests.Request):
              logger.info("model_info_level")
              logger.info(
                  "model_not_show", extra={"serve_access_log": True}
              )
              return {
                  "logs_path": logger.handlers[1].baseFilename,
              }
  
      serve.run(Model.bind())
  
      resp = requests.get("http://127.0.0.1:8000/")
      assert resp.status_code == 200
      resp = resp.json()
      check_log_file(resp["logs_path"], [".*model_info_level.*"])
      if enable_access_log:
          check_log_file(resp["logs_path"], [".*model_not_show.*"])
      else:
          with pytest.raises(AssertionError):
              check_log_file(resp["logs_path"], [".*model_not_show.*"])
  
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 5 for calling the TestLoggingAPI obj's underlying member method code with example usage: obj.test_access_log(serve_and_ray_shutdown, enable_access_log) and returns: dict