def test_sort(self, compute_unit, backend, rank, dynamic):
        """
        tf.sort dispatches to tf.math.top_k, and k = size of the axis to be sorted
        """
        if platform.machine() == "x86_64" and dynamic:
            pytest.xfail("rdar://135843153 ([Bug] Models failed on x86_64 platform)")

        # Here we test the conversion of tf.sort(x, axis=0)
        # If dynamic, we prepend None to x shape as the dynamic shape axis
        if rank == 5 and dynamic:
            rank -= 1
        shape = tuple(np.random.randint(low=3, high=8, size=rank))

        tf_input_shape = (None,) + shape if dynamic else shape
        @make_tf_graph([tf_input_shape])
        def build_model(x):
            return tf.sort(x, axis=0)

        model, inputs, outputs = build_model

        if dynamic:
            input_values = [random_gen((5,) + shape, rand_min=-100, rand_max=100)]
        else:
            input_values = [random_gen(shape, rand_min=-100, rand_max=100)]

        input_dict = dict(zip(inputs, input_values))
        TensorFlowBaseTest.run_compare_tf(
            model,
            input_dict,
            outputs,
            compute_unit=compute_unit,
            backend=backend,
        )

        tf.sort dispatches to tf.math.top_k, and k = size of the axis to be sorted
        
coremltools/converters/mil/frontend/tensorflow/test/test_ops.py