in emoclassifiers/chunking.py [0:0]
def from_simple_convo(cls, simple_convo: list[dict], idx: int, n_context: int = 3) -> "Chunk":
"""
Extract a chunk from a simple conversation given an index.
"""
assert 0 <= idx < len(simple_convo)
start_idx = max(0, idx - n_context)
return cls(
chunk=simple_convo[start_idx : idx + 1],
touches_start=start_idx == 0,
)