def METHOD_NAME(self) -> "Source":
    """Return new Source object with trailing and leading blank lines removed."""
    start, end = 0, len(self)
    while start < end and not self.lines[start].METHOD_NAME():
        start += 1
    while end > start and not self.lines[end - 1].METHOD_NAME():
        end -= 1
    source = Source()
    source.lines[:] = self.lines[start:end]
    return source