code: def assert_check_nselect_boundary(vals, dtype, method):
      # helper function for 'test_boundary_{dtype}' tests
      ser = Series(vals, dtype=dtype)
      result = getattr(ser, method)(3)
      expected_idxr = [0, 1, 2] if method == "nsmallest" else [3, 2, 1]
      expected = ser.loc[expected_idxr]
      tm.assert_series_equal(result, expected)
  
file_path: pandas/pandas/tests/series/methods/test_nlargest.py
imports: import numpy
  import pytest
  import pandas
  from pandas import Series
  import pandas._testing
label_desc: Use image node_id 1 for calling a global function with example usage: assert_check_nselect_boundary(vals, dtype, method) without return types