def trimStatements(self, statement):
        assert statement.parent is self

        old_statements = list(self.getStatements())
        assert statement in old_statements, \
          (statement, self)

        new_statements = old_statements[ : old_statements.index(statement)+1 ]

        self.setChild("statements", new_statements)
dataset/ETHPy150Open kayhayen/Nuitka/nuitka/nodes/StatementNodes.py/StatementsSequence.trimStatements/original