class_docstr: A LangChain CallbackHandler that records callbacks for offline playback.
code: def _append_record(
      self, type: str, args: tuple[Any, ...], kwargs: dict[str, Any]
  ) -> None:
      time_now = time.time()
      time_delta = (
          time_now - self._last_time
          if self._last_time is not None
          else 0
      )
      self._last_time = time_now
      self._records.append(
          CallbackRecord(
              callback_type=type,
              args=args,
              kwargs=kwargs,
              time_delta=time_delta,
          )
      )
  
imports: from __future__ import annotations
  import math
  import pickle
  import time
  from typing import Any, TypedDict
  from langchain.callbacks.base import BaseCallbackHandler
label_desc: Use image node_id 3 for calling the CapturingCallbackHandler obj's underlying member method code with example usage: obj._append_record(type, args, kwargs) without return types