async def _send_text(self,<EOL>request: Request,<EOL>stack: Stack,<EOL>parse_mode: Optional[Text] = None):
parts = []<EOL>chat_id = request.message.get_chat_id()<EOL>for layer in stack.layers:<EOL><INDENT>if isinstance(layer, (lyr.Text, lyr.RawText, lyr.Markdown)):<EOL><INDENT>text = await render(layer.text, request)<EOL>parts.append(text)<EOL><DEDENT><DEDENT>for part in parts[:-<NUM_LIT:1>]:<EOL><INDENT>await self.call(<EOL>'<STR_LIT>',<EOL>text=part,<EOL>chat_id=chat_id,<EOL>)<EOL><DEDENT>msg = {<EOL>'<STR_LIT:text>': parts[-<NUM_LIT:1>],<EOL>'<STR_LIT>': chat_id,<EOL>}<EOL>if parse_mode is not None:<EOL><INDENT>msg['<STR_LIT>'] = parse_mode<EOL><DEDENT>await set_reply_markup(msg, request, stack)<EOL>if stack.has_layer(Reply):<EOL><INDENT>reply = stack.get_layer(Reply)<EOL>if reply.message:<EOL><INDENT>msg['<STR_LIT>'] = reply.message['<STR_LIT>']<EOL><DEDENT><DEDENT>if stack.has_layer(Update):<EOL><INDENT>update = stack.get_layer(Update)<EOL>if update.inline_message_id:<EOL><INDENT>msg['<STR_LIT>'] = update.inline_message_id<EOL>del msg['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>msg['<STR_LIT>'] = update.message_id<EOL><DEDENT>await self.call(<EOL>'<STR_LIT>',<EOL>{'<STR_LIT>'},<EOL>**msg<EOL>)<EOL><DEDENT>else:<EOL><INDENT>await self.call('<STR_LIT>', **msg)<EOL><DEDENT>
Base function for sending text