code: def metrics(request: Request) -> Response:
      return Response(
          generate_latest(REGISTRY), media_type=CONTENT_TYPE_LATEST
      )
  
file_path: DeepPavlov/deeppavlov/utils/server/metrics.py
imports: import time
  from typing import Tuple
  from prometheus_client import CONTENT_TYPE_LATEST, REGISTRY, generate_latest
  from prometheus_client import Counter, Gauge, Histogram
  from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
  from starlette.requests import Request
  from starlette.responses import Response
  from starlette.types import ASGIApp
label_desc: Use image node_id 1 for calling a global function with example usage: metrics(request) and returns: Response