def METHOD_NAME(op: Operation, new_op: Operation):
    """Inserts a new operation after another operation."""
    if op.parent is None:
        raise Exception("Cannot insert an operation after a toplevel operation")
    op.parent.insert_ops_after((new_op,), op)