def METHOD_NAME(graph, testclass):
    x = tf.constant([2, 3, 4, 1], dtype=tf.float64)
    def test():
        x_all = []
        obs = ["a", "b", "c", "d"]
        x_obs = ["b", "c", "d", "a"]
        func_obs = [
            "d",
            "a",
            "b",
            "c",
        ]
        coords = testclass(obs)
        x_all.append(coords.reorder_x(x, x_obs=x_obs))
        x_all.append(coords.reorder_x(x, func_obs=func_obs))
        axes = [0, 1, 2, 3]
        x_axes = [1, 2, 3, 0]
        func_axes = [3, 0, 1, 2]
        coords = testclass(axes=axes)
        x_all.append(coords.reorder_x(x, x_axes=x_axes))
        x_all.append(coords.reorder_x(x, func_axes=func_axes))
        coords = testclass(obs=obs, axes=axes)
        x_all.append(coords.reorder_x(x, x_obs=x_obs, x_axes=x_axes))
        x_all.append(coords.reorder_x(x, func_obs=func_obs, func_axes=func_axes))
        coords = testclass(obs=obs, axes=axes)
        x_all.append(coords.reorder_x(x, x_obs=x_obs))
        x_all.append(coords.reorder_x(x, func_obs=func_obs))
        coords = testclass(obs)
        x_all.append(coords.reorder_x(x, x_obs=x_obs, x_axes=x_axes))
        x_all.append(coords.reorder_x(x, func_obs=func_obs, func_axes=func_axes))
        with pytest.raises(ValueError):
            coords.reorder_x(x, x_axes=x_axes)
        with pytest.raises(ValueError):
            coords.reorder_x(x, func_axes=func_axes)
        coords = testclass(axes=axes)
        with pytest.raises(ValueError):
            coords.reorder_x(x, x_obs=x_obs)
        with pytest.raises(ValueError):
            coords.reorder_x(x, func_obs=func_obs)
        return x_all
    if graph:
        test = z.function(test)
    all_x = test()
    true_x = tf.constant([1, 2, 3, 4], dtype=tf.float64)
    for x in all_x:
        assert np.allclose(x, true_x)