(rows: Sequence[Dict[str, Any]])
| 666 | |
| 667 | |
| 668 | def group_by_episode(rows: Sequence[Dict[str, Any]]) -> Dict[str, List[Dict[str, Any]]]: |
| 669 | grouped: Dict[str, List[Dict[str, Any]]] = defaultdict(list) |
| 670 | for row in rows: |
| 671 | episode_id = str(row.get("episode_id") or "").strip() |
| 672 | if episode_id: |
| 673 | grouped[episode_id].append(row) |
| 674 | return grouped |
| 675 | |
| 676 | |
| 677 | def label_key(row: Dict[str, Any]) -> Tuple[str, str]: |
no test coverage detected