def fuse2(*args, **kwargs):
    """Run both ``fuse`` and ``fuse_linear`` and compare results."""
    rv1 = fuse_linear(*args, **kwargs)
    if kwargs.get("rename_keys") is not False:
        return rv1
    rv2 = fuse(*args, **kwargs)
    assert rv1 == rv2
    return rv1
Run both ``fuse`` and ``fuse_linear`` and compare results.
tests/core/serve/test_dag/test_optimization.py