code: def in_request(
      self, request: starlette.requests.Request
  ) -> t.Generator[ServiceContext, None, None]:
      request_token = self._request_var.set(
          ServiceContext.RequestContext.from_http(request)
      )
      response_token = self._response_var.set(
          ServiceContext.ResponseContext()
      )
      try:
          yield self
      finally:
          self._request_var.reset(request_token)
          self._response_var.reset(response_token)
  
imports: from __future__ import annotations
  import contextlib
  import contextvars
  import os
  import typing
  from abc import ABC
  from abc import abstractmethod
  from typing import TYPE_CHECKING
  import attr
  import starlette.datastructures
  from .utils.http import Cookie
label_desc: Use image node_id 2 for calling the ServiceContext obj's underlying member method code with example usage: obj.in_request(request) without return types