class_docstr: ASGI Middleware implementation that intercepts and decorates the send
  and receive callables to generate the BentoML access log.
code: def __init__(
      self,
      app: ext.ASGIApp,
      has_request_content_length: bool = False,
      has_request_content_type: bool = False,
      has_response_content_length: bool = False,
      has_response_content_type: bool = False,
  ) -> None:
      self.app = app
      self.has_request_content_length = has_request_content_length
      self.has_request_content_type = has_request_content_type
      self.has_response_content_length = has_response_content_length
      self.has_response_content_type = has_response_content_type
      self.logger = logging.getLogger("bentoml.access")
  
imports: from __future__ import annotations
  import logging
  from contextvars import ContextVar
  from timeit import default_timer
  from typing import TYPE_CHECKING
label_desc: Use image node_id 1 to create a new AccessLogMiddleware object  with example: obj = AccessLogMiddleware(app, has_request_content_length, has_request_content_type, has_response_content_length, has_response_content_type)