def external_caller_frame(offset=0) -> FrameType:
    """Get the caller's (of this function) frame that is not in the trulens
    namespace.

    Raises:
        RuntimeError: If no such frame is found.
    """
    frame = inspect.currentframe()
    gen = stack_generator(frame=frame, offset=offset + 1)
    for f_info in gen:
        name = f_info.f_globals["__name__"]
        if not (name.startswith("trulens") or name.startswith("pydantic")):
            return f_info

    raise RuntimeError("No external caller frame found.")
Get the caller's (of this function) frame that is not in the trulens
    namespace.

    Raises:
        RuntimeError: If no such frame is found.
    
src/core/trulens/core/utils/python.py