def METHOD_NAME(test_case):
    for type_tensor_case in type_tensor_all:
        x = type_tensor_case["cpu_interface"](np.random.randn(2, 3, 4, 5))
        test_case.assertEqual(x.device, flow.device("cpu"))
        test_case.assertEqual(x.dtype, type_tensor_case["dtype"])
        test_case.assertEqual(x.shape, (2, 3, 4, 5))
        test_case.assertFalse(x.requires_grad)
        test_case.assertTrue(x.is_leaf)
        y = type_tensor_case["cuda_interface"](np.random.randn(2, 3, 4, 5))
        test_case.assertEqual(y.device, flow.device("cuda"))
        test_case.assertEqual(y.dtype, type_tensor_case["dtype"])
        test_case.assertEqual(y.shape, (2, 3, 4, 5))
        test_case.assertFalse(y.requires_grad)
        test_case.assertTrue(y.is_leaf)