def get_module_text(self, module_name, event):
index = event.get("<STR_LIT:index>")<EOL>module_info = self.py3_wrapper.output_modules.get(module_name)<EOL>output = module_info["<STR_LIT>"].get_latest()<EOL>full_text = u"<STR_LIT>".join([out["<STR_LIT>"] for out in output])<EOL>partial = None<EOL>if index is not None:<EOL><INDENT>if isinstance(index, int):<EOL><INDENT>partial = output[index]<EOL><DEDENT>else:<EOL><INDENT>for item in output:<EOL><INDENT>if item.get("<STR_LIT:index>") == index:<EOL><INDENT>partial = item<EOL>break<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if partial:<EOL><INDENT>partial_text = partial["<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>partial_text = full_text<EOL><DEDENT>return full_text, partial_text<EOL>
Get the full text for the module as well as the partial text if the
module is a composite.  Partial text is the text for just the single
section of a composite.