def set_time_value(self, value=None):
if value is None:<EOL><INDENT>raise NullArgument()<EOL><DEDENT>if self.get_time_value_metadata().is_read_only():<EOL><INDENT>raise NoAccess()<EOL><DEDENT>if self.my_osid_object_form._is_valid_duration(<EOL>value,<EOL>self.get_time_value_metadata()):<EOL><INDENT>time = self._convert_duration_to_hhmmss(value)<EOL><DEDENT>elif utilities.is_string(value):<EOL><INDENT>time = self._convert_string_to_hhmmss(value)<EOL><DEDENT>else:<EOL><INDENT>raise InvalidArgument('<STR_LIT>')<EOL><DEDENT>self.my_osid_object_form._my_map['<STR_LIT>'] = {<EOL>'<STR_LIT>': time['<STR_LIT>'],<EOL>'<STR_LIT>': time['<STR_LIT>'],<EOL>'<STR_LIT>': time['<STR_LIT>']<EOL>}<EOL>
stub