"""PKL conventions for the YAM training dataset.

Per-frame layout, ``T_wrist_in_world`` reads, and the hot-patch marker.

Reading PKLs is for training + tools (no try/except — let pickle errors
propagate; corruption in a single PKL means the recording is broken
and should be deleted, not silently masked).
"""
from __future__ import annotations

import pickle
from pathlib import Path

import numpy as np


def load_lowdim(pkl_path: Path) -> dict:
    """Load a single per-frame PKL. See README for required keys."""
    # TODO: pickle.load + assert required keys present (joints, action,
    # right_scene_camera_extrinsic, right_scene_camera_intrinsic,
    # right_wrist_camera_intrinsic, T_wrist_in_world, T_left_from_right).
    raise NotImplementedError


def assert_scene_in_lbase(fd: dict) -> None:
    """Verify the scene extrinsic has been hot-patched to left_arm_base.

    Raises if `_scene_in_lbase` is missing or False.
    """
    # TODO: if not fd.get("_scene_in_lbase"): raise RuntimeError(...).
    raise NotImplementedError
