class_docstr: We must have a cached version of incoming requests since the request body cannot be read from middleware directly.
  See <https://github.com/encode/starlette/issues/847> for more information
  
  TODO Remove usage of CachedRequest when https://github.com/encode/starlette/pull/848 is released
class_docstr_tok: ["We","must","have","a","cached","version","of","incoming","requests","since","the","request","body","can","not","be","read","from","middleware","directly",".","See","<","https",":","\/\/github.com\/encode\/starlette\/issues\/847",">","for","more","information","TODO","Remove","usage","of","CachedRequest","when","https",":","\/\/github.com\/encode\/starlette\/pull\/848","is","released"]
code: def receive(self) -> Receive:
      body = None
      if hasattr(self, "_body"):
          body = self._body
      if body is not None:
  
          async def cached_receive() -> Message:
              return dict(type="http.request", body=body)
  
          return cached_receive
      return self._receive
  
imports: import datetime
  import json
  import logging
  import re
  from typing import Any, Callable, Dict, List, Optional, Tuple
  from argilla.client.models import Record, TextClassificationRecord, TokenClassificationRecord
  from argilla.monitoring.base import BaseMonitor
  from argilla.utils.dependency import require_dependencies
  from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
  from starlette.requests import Request
  from starlette.responses import JSONResponse, Response, StreamingResponse
  from starlette.types import Message, Receive
label_desc: Use image node_id 1 for calling the CachedJsonRequest obj's underlying member method code with example usage: obj.receive() and returns: self, cached_receive, dict