def lines_before(self, document, how_many): return "\n".join(dump(document, Dumper=RoundTripDumper).split('\n')[ self.start_line(document) - 1 - how_many:self.start_line(document) - 1 ])