code: def test_take_adv(self):
      pdf = pd.DataFrame(
          {
              "A": range(0, 50000),
              "B": range(100000, 0, -2),
              "C": range(100000, 50000, -1),
          }
      )
      psdf = ps.from_pandas(pdf)
  
      # MultiIndex columns
      columns = pd.MultiIndex.from_tuples(
          [("A", "Z"), ("B", "X"), ("C", "C")]
      )
      psdf.columns = columns
      pdf.columns = columns
  
      # MultiIndex columns with axis=0 (default)
      self.assert_eq(
          psdf.take([1, 2]).sort_index(), pdf.take([1, 2]).sort_index()
      )
      self.assert_eq(
          psdf.take([-1, -2]).sort_index(),
          pdf.take([-1, -2]).sort_index(),
      )
      self.assert_eq(
          psdf.take(range(100, 110)).sort_index(),
          pdf.take(range(100, 110)).sort_index(),
      )
      self.assert_eq(
          psdf.take(range(-110, -100)).sort_index(),
          pdf.take(range(-110, -100)).sort_index(),
      )
      self.assert_eq(
          psdf.take([10, 100, 1000, 10000]).sort_index(),
          pdf.take([10, 100, 1000, 10000]).sort_index(),
      )
      self.assert_eq(
          psdf.take([-10, -100, -1000, -10000]).sort_index(),
          pdf.take([-10, -100, -1000, -10000]).sort_index(),
      )
  
      # axis=1
      self.assert_eq(
          psdf.take([1, 2], axis=1).sort_index(),
          pdf.take([1, 2], axis=1).sort_index(),
      )
      self.assert_eq(
          psdf.take([-1, -2], axis=1).sort_index(),
          pdf.take([-1, -2], axis=1).sort_index(),
      )
      self.assert_eq(
          psdf.take(range(1, 3), axis=1).sort_index(),
          pdf.take(range(1, 3), axis=1).sort_index(),
      )
      self.assert_eq(
          psdf.take(range(-1, -3), axis=1).sort_index(),
          pdf.take(range(-1, -3), axis=1).sort_index(),
      )
      self.assert_eq(
          psdf.take([2, 1], axis=1).sort_index(),
          pdf.take([2, 1], axis=1).sort_index(),
      )
      self.assert_eq(
          psdf.take([-1, -2], axis=1).sort_index(),
          pdf.take([-1, -2], axis=1).sort_index(),
      )
  
      # Checking the type of indices.
      self.assertRaises(TypeError, lambda: psdf.take(1))
      self.assertRaises(TypeError, lambda: psdf.take("1"))
      self.assertRaises(TypeError, lambda: psdf.take({1, 2}))
      self.assertRaises(
          TypeError, lambda: psdf.take({1: None, 2: None})
      )
  
file_path: spark/python/pyspark/pandas/tests/frame/test_take_adv.py
imports: import unittest
  import pandas
  from pyspark import pandas
  from pyspark.testing.pandasutils import PandasOnSparkTestCase
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 1 for calling the FrameTakeAdvMixin obj's underlying member method code with example usage: obj.test_take_adv() without return types