def ensure_eol(self) -> None:
    'Ensure the last line in body is terminated by new line.'
    if (self.body and (self.body[(- 1)][(- 1):] != '\n')):
        self.body.append('\n')
Ensure the last line in body is terminated by new line.
def ensure_eol(self) -> None:
    
    if (self.body and (self.body[(- 1)][(- 1):] != '\n')):
        self.body.append('\n')