1$ intervals if $t_i>\lfloor t_i \rfloor>t_1$, into $t_i$ intervals if $t_i=\lfloor t_i \rfloor >t_1$ and is kept unchanged if $\lfloor t_i \rfloor<t_1$. Each interval $k$ will have the following information encoded:

1.  The beginning of the interval, which equals the time $t_{k-1}$ of visit $k-1$, with $t_0 = 0$.

2.  The end of the interval, which equals the time $t_k$ of visit $k$ or the event/censoring time $t_i$ for the last interval.

3.  The event status at the end of the interval.

4.  The exposure $A_i$ and the baseline covariates $L_{0i}$, whose values remain unchanged across all intervals.

5.  The history of the mediator and the longitudinal confounders recorded up to the end of the interval. Note that the history of $L$ and $M$ for subject $i$ up to the time $t_i$ is similar to their history up to the last visit prior to time $t_i$.

Table 1 provides a toy example in which three patients receive a binary treatment and are followed up for a total of three years, with two visits pre-planned at the end of year 1 and 2. Patient 3 is free of event till the end of the study and hence has the mediator level 