(rows: Sequence[Dict[str, Any]])
| 589 | |
| 590 | |
| 591 | def group_by_episode(rows: Sequence[Dict[str, Any]]) -> Dict[str, List[Dict[str, Any]]]: |
| 592 | grouped: Dict[str, List[Dict[str, Any]]] = defaultdict(list) |
| 593 | for row in rows: |
| 594 | episode_id = str(row.get("episode_id") or "").strip() |
| 595 | if episode_id: |
| 596 | grouped[episode_id].append(row) |
| 597 | return grouped |
| 598 | |
| 599 | |
| 600 | def label_key(row: Dict[str, Any]) -> Tuple[str, str]: |
no test coverage detected