code: def test_nlargest_n(self, n):
      # GH 13412
      ser = Series([1, 4, 3, 2], index=[0, 0, 1, 1])
      result = ser.nlargest(n)
      expected = ser.sort_values(ascending=False).head(n)
      tm.assert_series_equal(result, expected)
  
      result = ser.nsmallest(n)
      expected = ser.sort_values().head(n)
      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 4 for calling the TestSeriesNLargestNSmallest obj's underlying member method code with example usage: obj.test_nlargest_n(n) without return types