def METHOD_NAME(self):
    """make sure Interpreter._remove_unused_temporaries() does not generate
    invalid code for rare chained assignment cases
    """
    # regular chained assignment
    def impl1(a):
        b = c = a + 1
        return (b, c)
    # chained assignment with setitem
    def impl2(A, i, a):
        b = A[i] = a + 1
        return b, A[i] + 2
    # chained assignment with setattr
    def impl3(A, a):
        b = A.a = a + 1
        return b, A.a + 2
    class C:
        pass
    self.assertEqual(impl1(5), njit(impl1)(5))
    self.assertEqual(impl2(np.ones(3), 0, 5), njit(impl2)(np.ones(3), 0, 5))
    self.assertEqual(impl3(C(), 5), jit(forceobj=True)(impl3)(C(), 5))