def append_footer(self, line):
    'Adds a footer line to the description.\n\n    Differentiates legacy "KEY=xxx" footers (used to be called tags) and\n    Gerrit\'s footers in the form of "Footer-Key: footer any value" and ensures\n    that Gerrit footers are always at the end.\n    '
    parsed_footer_line = git_footers.parse_footer(line)
    if parsed_footer_line:
        self.set_description(git_footers.add_footer(self.description, key=parsed_footer_line[0], value=parsed_footer_line[1]))
        return
    if (not self._description_lines):
        self._description_lines.append(line)
        return
    (top_lines, gerrit_footers, _) = git_footers.split_footers(self.description)
    if gerrit_footers:
        assert (top_lines and (top_lines[(- 1)] == ''))
        (top_lines, separator) = (top_lines[:(- 1)], top_lines[(- 1):])
    else:
        separator = []
    prev_line = (top_lines[(- 1)] if top_lines else '')
    if ((not presubmit_support.Change.TAG_LINE_RE.match(prev_line)) or (not presubmit_support.Change.TAG_LINE_RE.match(line))):
        top_lines.append('')
    top_lines.append(line)
    self._description_lines = ((top_lines + separator) + gerrit_footers)
Adds a footer line to the description.

Differentiates legacy "KEY=xxx" footers (used to be called tags) and
Gerrit's footers in the form of "Footer-Key: footer any value" and ensures
that Gerrit footers are always at the end.
def append_footer(self, line):
    'Adds a footer line to the description.\n\n    Differentiates legacy "KEY=xxx" footers (used to be called tags) and\n    Gerrit\'s footers in the form of "Footer-Key: footer any value" and ensures\n    that Gerrit footers are always at the end.\n    '
    parsed_footer_line = git_footers.parse_footer(line)
    if parsed_footer_line:
        self.set_description(git_footers.add_footer(self.description, key=parsed_footer_line[0], value=parsed_footer_line[1]))
        return
    if (not self._description_lines):
        self._description_lines.append(line)
        return
    (top_lines, gerrit_footers, _) = git_footers.split_footers(self.description)
    if gerrit_footers:
        assert (top_lines and (top_lines[(- 1)] == ))
        (top_lines, separator) = (top_lines[:(- 1)], top_lines[(- 1):])
    else:
        separator = []
    prev_line = (top_lines[(- 1)] if top_lines else )
    if ((not presubmit_support.Change.TAG_LINE_RE.match(prev_line)) or (not presubmit_support.Change.TAG_LINE_RE.match(line))):
        top_lines.append()
    top_lines.append(line)
    self._description_lines = ((top_lines + separator) + gerrit_footers)