def METHOD_NAME(self, dat, dtype):
    """
    Test logistic map with forward and backward terms that should cancel.
    """
    iterations = 10000
    r = Constant(name='r', dtype=dtype)
    r.data = dtype(dat)
    s = dtype(0.1)
    grid = Grid(shape=(2, 2), extent=(1, 1), dtype=dtype)
    dt = grid.stepping_dim.spacing
    print("dt = ", dt)
    f0 = TimeFunction(name='f0', grid=grid, time_order=2, dtype=dtype)
    f1 = TimeFunction(name='f1', grid=grid, time_order=2, save=iterations+2,
                      dtype=dtype)
    initial_condition = dtype(0.7235)
    lmap0 = Eq(f0.forward, r*f0*(1.0-f0+(1.0/s)*dt*f0.backward
                                 - f0.backward+(1.0/s)*dt*f0.forward-f0.forward))
    lmap1 = Eq(f1.forward, r*f1*(1.0-f1+(1.0/s)*dt*f1.backward
                                 - f1.backward+(1.0/s)*dt*f1.forward-f1.forward))
    f0.data[1, :, :] = initial_condition
    f1.data[1, :, :] = initial_condition
    op0 = Operator([Eq(f0.forward, dtype(0.0)), lmap0])
    op1 = Operator(lmap1)
    op0(time_m=1, time_M=iterations, dt=s)
    op1(time_m=1, time_M=iterations, dt=s)
    assert np.allclose(f0.data[np.mod(iterations+1, 3)], f1.data[iterations+1],
                       atol=0, rtol=0)