code: def test_nlargest_n_identical_values(self):
      # GH#15297
      df = pd.DataFrame({"a": [1] * 5, "b": [1, 2, 3, 4, 5]})
  
      result = df.nlargest(3, "a")
      expected = pd.DataFrame(
          {"a": [1] * 3, "b": [1, 2, 3]}, index=[0, 1, 2]
      )
      tm.assert_frame_equal(result, expected)
  
      result = df.nsmallest(3, "a")
      expected = pd.DataFrame({"a": [1] * 3, "b": [1, 2, 3]})
      tm.assert_frame_equal(result, expected)
  
file_path: pandas/pandas/tests/frame/methods/test_nlargest.py
imports: from string import ascii_lowercase
  import numpy
  import pytest
  import pandas
  import pandas._testing
  from pandas.util.version import Version
label_desc: Use image node_id 5 for calling the TestNLargestNSmallest obj's underlying member method code with example usage: obj.test_nlargest_n_identical_values() without return types