code: def test_argmin_argmax(self):
      pser = pd.Series(
          {
              "Corn Flakes": 100.0,
              "Almond Delight": 110.0,
              "Cinnamon Toast Crunch": 120.0,
              "Cocoa Puff": 110.0,
              "Expensive Flakes": 120.0,
              "Cheap Flakes": 100.0,
          },
          name="Koalas",
      )
      psser = ps.from_pandas(pser)
      self.assert_eq(pser.argmin(), psser.argmin())
      self.assert_eq(pser.argmax(), psser.argmax())
      self.assert_eq(
          pser.argmin(skipna=False), psser.argmin(skipna=False)
      )
      self.assert_eq(
          pser.argmax(skipna=False), psser.argmax(skipna=False)
      )
      self.assert_eq(
          pser.argmax(skipna=False), psser.argmax(skipna=False)
      )
      self.assert_eq(
          (pser + 1).argmax(skipna=False),
          (psser + 1).argmax(skipna=False),
      )
      self.assert_eq(
          pser.argmin(skipna=False), psser.argmin(skipna=False)
      )
      self.assert_eq(
          (pser + 1).argmin(skipna=False),
          (psser + 1).argmin(skipna=False),
      )
  
      # MultiIndex
      pser.index = pd.MultiIndex.from_tuples(
          [
              ("a", "t"),
              ("b", "u"),
              ("c", "v"),
              ("d", "w"),
              ("e", "x"),
              ("f", "u"),
          ]
      )
      psser = ps.from_pandas(pser)
      self.assert_eq(pser.argmin(), psser.argmin())
      self.assert_eq(pser.argmax(), psser.argmax())
      self.assert_eq(
          pser.argmax(skipna=False), psser.argmax(skipna=False)
      )
  
      pser2 = pd.Series([np.NaN, 1.0, 2.0, np.NaN])
      psser2 = ps.from_pandas(pser2)
      self.assert_eq(pser2.argmin(), psser2.argmin())
      self.assert_eq(pser2.argmax(), psser2.argmax())
      self.assert_eq(
          pser2.argmin(skipna=False), psser2.argmin(skipna=False)
      )
      self.assert_eq(
          pser2.argmax(skipna=False), psser2.argmax(skipna=False)
      )
  
      # Null Series
      self.assert_eq(
          pd.Series([np.nan]).argmin(), ps.Series([np.nan]).argmin()
      )
      self.assert_eq(
          pd.Series([np.nan]).argmax(), ps.Series([np.nan]).argmax()
      )
      self.assert_eq(
          pd.Series([np.nan]).argmax(skipna=False),
          ps.Series([np.nan]).argmax(skipna=False),
      )
  
      with self.assertRaisesRegex(
          ValueError, "attempt to get argmin of an empty sequence"
      ):
          ps.Series([]).argmin()
      with self.assertRaisesRegex(
          ValueError, "attempt to get argmax of an empty sequence"
      ):
          ps.Series([]).argmax()
      with self.assertRaisesRegex(
          ValueError, "axis can only be 0 or 'index'"
      ):
          psser.argmax(axis=1)
      with self.assertRaisesRegex(
          ValueError, "axis can only be 0 or 'index'"
      ):
          psser.argmin(axis=1)
  
file_path: spark/python/pyspark/pandas/tests/series/test_arg_ops.py
imports: import unittest
  import numpy
  import pandas
  from pyspark import pandas
  from pyspark.testing.pandasutils import ComparisonTestBase
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 2 for calling the SeriesArgOpsMixin obj's underlying member method code with example usage: obj.test_argmin_argmax() without return types