def METHOD_NAME(
    a: List[Dict], b: List[Dict]
) -> Optional[Tuple[List[str], List[str], List[str]]]:
    """Compare two lists of records. Returns empty list if equal."""
    b_by_id = {r["id"]: r for r in b}
    missing = []
    differ = []
    for ra in a:
        rb = b_by_id.pop(ra["id"], None)
        if rb is None:
            missing.append(ra["id"])
        elif not records_equal(ra, rb):
            differ.append(ra["id"])
    extras = list(b_by_id.keys())
    if missing or differ or extras:
        return (missing, differ, extras)
    return None