def replace_baseline_repr(self, linenum, update):
<EOL>lines = self.lines<EOL>count = <NUM_LIT:0><EOL>delimiter = None<EOL>for index in range(linenum - <NUM_LIT:1>, -<NUM_LIT:1>, -<NUM_LIT:1>):<EOL><INDENT>line = lines[index]<EOL>if delimiter is None:<EOL><INDENT>single_quote_index = line.rfind("<STR_LIT>")<EOL>double_quote_index = line.rfind('<STR_LIT>')<EOL>if double_quote_index >= <NUM_LIT:0>:<EOL><INDENT>if double_quote_index > single_quote_index:<EOL><INDENT>delimiter = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>delimiter = "<STR_LIT>"<EOL><DEDENT><DEDENT>elif single_quote_index >= <NUM_LIT:0>:<EOL><INDENT>delimiter = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>count += lines[index].count(delimiter)<EOL>if count >= <NUM_LIT:2>:<EOL><INDENT>linenum = index<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>docstr_not_found = (<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(self.showpath(self.path), linenum))<EOL>raise RuntimeError(docstr_not_found)<EOL><DEDENT>old_content = '<STR_LIT:\n>'.join(lines[linenum:])<EOL>match = self.REGEX.match(old_content)<EOL>if match is None:<EOL><INDENT>docstr_not_found = (<EOL>'<STR_LIT>'.format(self.path, linenum))<EOL>raise RuntimeError(docstr_not_found)<EOL><DEDENT>new_content = match.group('<STR_LIT>') + update + match.group('<STR_LIT>')<EOL>lines[linenum:] = new_content.split('<STR_LIT:\n>')<EOL>
Replace individual baseline representation.

        :param int linenum: location of baseline representation
        :param str update: new baseline representation text (with delimiters)