(rows: Sequence[Dict[str, Any]])
| 467 | |
| 468 | |
| 469 | def group_by_episode(rows: Sequence[Dict[str, Any]]) -> Dict[str, List[Dict[str, Any]]]: |
| 470 | grouped: Dict[str, List[Dict[str, Any]]] = defaultdict(list) |
| 471 | for row in rows: |
| 472 | episode_id = str(row.get("episode_id") or "").strip() |
| 473 | if episode_id: |
| 474 | grouped[episode_id].append(row) |
| 475 | return grouped |
| 476 | |
| 477 | |
| 478 | def label_key(row: Dict[str, Any]) -> Tuple[str, str]: |
no test coverage detected