code: def test_nargsort(self, ascending, na_position, exp):
      # list places NaNs last, np.array(..., dtype="O") may not place NaNs first
      items = np.array(
          [np.nan] * 5 + list(range(100)) + [np.nan] * 5, dtype="O"
      )
  
      # mergesort is the most difficult to get right because we want it to be
      # stable.
  
      # According to numpy/core/tests/test_multiarray, """The number of
      # sorted items must be greater than ~50 to check the actual algorithm
      # because quick and merge sort fall over to insertion sort for small
      # arrays."""
  
      result = nargsort(
          items,
          kind="mergesort",
          ascending=ascending,
          na_position=na_position,
      )
      tm.assert_numpy_array_equal(
          result, np.array(exp), check_dtype=False
      )
  
imports: from collections import defaultdict
  from datetime import datetime
  from itertools import product
  import numpy
  import pytest
  from pandas import NA, DataFrame, MultiIndex, Series, array, concat, merge
  import pandas._testing
  from pandas.core.algorithms import safe_sort
  import pandas.core.common
  from pandas.core.sorting import _decons_group_index, get_group_index, is_int64_overflow_possible, lexsort_indexer, nargsort
label_desc: Use image node_id 5 for calling the TestSorting obj's underlying member method code with example usage: obj.test_nargsort(ascending, na_position, exp) without return types