def METHOD_NAME(self):
    # Test `is_same_graph` with more complex graphs.
    x, y, z = vectors("x", "y", "z")
    t = x * y
    self.check(
        [
            (x * 2, x * 2, (({}, True),)),
            (
                x * 2,
                y * 2,
                (
                    ({}, False),
                    ({y: x}, True),
                ),
            ),
            (
                x * 2,
                y * 2,
                (
                    ({}, False),
                    ({x: y}, True),
                ),
            ),
            (
                x * 2,
                y * 3,
                (
                    ({}, False),
                    ({y: x}, False),
                ),
            ),
            (
                t * 2,
                z * 2,
                (
                    ({}, False),
                    ({t: z}, True),
                ),
            ),
            (
                t * 2,
                z * 2,
                (
                    ({}, False),
                    ({z: t}, True),
                ),
            ),
            (x * (y * z), (x * y) * z, (({}, False),)),
        ]
    )