code: def test_equal_values(ctx, fname, reverse):
      with nn.context_scope(ctx), nn.auto_forward(True):
          x = nn.Variable.from_numpy_array([2, 3, 3, 4, 2])
          y, i = F.sort(x, reverse=reverse, with_index=True)
          assert all(
              y.d == ([4, 3, 3, 2, 2] if reverse else [2, 2, 3, 3, 4])
          )
          assert all(
              i.d == ([3, 1, 2, 0, 4] if reverse else [0, 4, 1, 2, 3])
          )
  
file_path: nnabla/python/test/function/test_sort.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nbla_test_utils import list_context, function_tester
label_desc: Use image node_id 4 for calling a global function with example usage: test_equal_values(ctx, fname, reverse) without return types