async def expand(self, request: Request, layer: BaseLayer):
if isinstance(layer, lyr.RawText):<EOL><INDENT>t = self.reading_time(layer.text)<EOL>yield layer<EOL>yield lyr.Sleep(t)<EOL><DEDENT>elif isinstance(layer, lyr.MultiText):<EOL><INDENT>texts = await render(layer.text, request, True)<EOL>for text in texts:<EOL><INDENT>t = self.reading_time(text)<EOL>yield lyr.RawText(text)<EOL>yield lyr.Sleep(t)<EOL><DEDENT><DEDENT>elif isinstance(layer, lyr.Text):<EOL><INDENT>text = await render(layer.text, request)<EOL>t = self.reading_time(text)<EOL>yield lyr.RawText(text)<EOL>yield lyr.Sleep(t)<EOL><DEDENT>else:<EOL><INDENT>yield layer<EOL><DEDENT>
Expand a layer into a list of layers including the pauses.