def add_text(self, text, label=None):
if label is None:<EOL><INDENT>label = self._label_metadata['<STR_LIT>'][<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>if not self.my_osid_object_form._is_valid_string(<EOL>label, self.get_label_metadata()) or '<STR_LIT:.>' in label:<EOL><INDENT>raise InvalidArgument('<STR_LIT:label>')<EOL><DEDENT><DEDENT>if text is None:<EOL><INDENT>raise NullArgument('<STR_LIT>')<EOL><DEDENT>if not (self.my_osid_object_form._is_valid_string(<EOL>text, self.get_text_metadata()) or isinstance(text, DisplayText)):<EOL><INDENT>raise InvalidArgument('<STR_LIT:text>')<EOL><DEDENT>if utilities.is_string(text):<EOL><INDENT>self.my_osid_object_form._my_map['<STR_LIT>'][label] = {<EOL>'<STR_LIT:text>': text,<EOL>'<STR_LIT>': str(DEFAULT_LANGUAGE_TYPE),<EOL>'<STR_LIT>': str(DEFAULT_SCRIPT_TYPE),<EOL>'<STR_LIT>': str(DEFAULT_FORMAT_TYPE)<EOL>}<EOL><DEDENT>else:<EOL><INDENT>self.my_osid_object_form._my_map['<STR_LIT>'][label] = {<EOL>'<STR_LIT:text>': text.text,<EOL>'<STR_LIT>': str(text.language_type),<EOL>'<STR_LIT>': str(text.script_type),<EOL>'<STR_LIT>': str(text.format_type)<EOL>}<EOL><DEDENT>
stub