def METHOD_NAME(self):
    s = 0
    for l in self.lines:
        if len(l.strip()) == 0:
            s += 1
        else:
            break
    e = len(self.lines)
    for l in reversed(self.lines):
        if len(l.strip()) == 0:
            e -= 1
        else:
            break
    self.lines = self.lines[s:e]