Expand a layer into a list of layers including the pauses.

async def expand(self, request: Request, layer: BaseLayer):
        """
        Expand a layer into a list of layers including the pauses.
        """

        if isinstance(layer, lyr.RawText):
            t = self.reading_time(layer.text)
            yield layer
            yield lyr.Sleep(t)

        elif isinstance(layer, lyr.MultiText):
            texts = await render(layer.text, request, True)

            for text in texts:
                t = self.reading_time(text)
                yield lyr.RawText(text)
                yield lyr.Sleep(t)

        elif isinstance(layer, lyr.Text):
            text = await render(layer.text, request)
            t = self.reading_time(text)
            yield lyr.RawText(text)
            yield lyr.Sleep(t)

        else:
            yield layer