code: def load_records_from_file(path: str) -> list[CallbackRecord]:
      """Load the list of CallbackRecords from a pickle file at the given path."""
      with open(path, "rb") as file:
          records = pickle.load(file)
  
      if not isinstance(records, list):
          raise RuntimeError(f"Bad CallbackRecord data in {path}")
      return records
  
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 1 for calling a global function with example usage: load_records_from_file(path) and returns: records