def METHOD_NAME(test_case, shape, dtype, device):
    np_input = np.random.randint(3, size=shape)
    np_other = np.random.randint(3, size=shape)
    input = flow.tensor(np_input, dtype=dtype, device=flow.device(device))
    other = flow.tensor(np_other, dtype=dtype, device=flow.device(device))
    of_out = flow.logical_and(input, other)
    np_out = np.logical_and(np_input, np_other)
    test_case.assertTrue(np.array_equal(of_out.numpy(), np_out))
    x = torch.ones(3).byte()
    y = torch.ones(3).byte()
    z = (x & ~y).bool()
    test_case.assertTrue(np.array_equal(z.numpy(), [False, False, False]))