docstr: Lazily initialize the metrics object.
  
  Args:
      *args: Arguments to pass to the metrics object.
      **kwargs: Keyword arguments to pass to the metrics object.
docstr_tok: ["Lazily","initialize","the","metrics","object",".","Args",":","*","args",":","Arguments","to","pass","to","the","metrics","object",".","*","*","kwargs",":","Keyword","arguments","to","pass","to","the","metrics","object","."]
code: def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Any:
      """
      Lazily initialize the metrics object.
  
      Args:
          *args: Arguments to pass to the metrics object.
          **kwargs: Keyword arguments to pass to the metrics object.
      """
      if "registry" in kwargs:
          raise ValueError(
              f"'registry' should not be passed when using '{__name__}.{self._attr}'. See https://docs.bentoml.com/en/latest/reference/metrics.html."
          )
      self._args = args
      self._kwargs = kwargs
      if self._attr in _INTERNAL_FN_IMPL:
          # first-class function implementation from BentoML Prometheus client.
          # In this case, the function will be called directly.
          return self._load_proxy()
      return self
  
file_path: BentoML/src/bentoml/metrics.py
imports: from __future__ import annotations
  import logging
  import typing
  from typing import TYPE_CHECKING
  from simple_di import Provide
  from simple_di import inject
  from ._internal.configuration.containers import BentoMLContainer
label_desc: Use image node_id 2 for calling the _LazyMetric obj's underlying member method code with example usage: obj.__call__() and returns: self, self