fn write_timeline_outputs( c: &Ctx<'_>, plans: &[StemPlan], index: &IndexMap<i64, Map<String, Value>>, total_ms: i64, timeline: &IndexMap<i64, i64>, layers: [Vec<Label>; 4], ) -> Result<()>