code: def test_sql_with_index_col(self):
      import pandas as pd
  
      # Index
      psdf = ps.DataFrame(
          {"A": [1, 2, 3], "B": [4, 5, 6]},
          index=pd.Index(["a", "b", "c"], name="index"),
      )
      psdf_reset_index = psdf.reset_index()
      actual = ps.sql(
          "select * from {psdf_reset_index} where A > 1",
          index_col="index",
          psdf_reset_index=psdf_reset_index,
      )
      expected = psdf.iloc[[1, 2]]
      assertDataFrameEqual(actual, expected)
  
      # MultiIndex
      psdf = ps.DataFrame(
          {"A": [1, 2, 3], "B": [4, 5, 6]},
          index=pd.MultiIndex.from_tuples(
              [("a", "b"), ("c", "d"), ("e", "f")],
              names=["index1", "index2"],
          ),
      )
      psdf_reset_index = psdf.reset_index()
      actual = ps.sql(
          "select * from {psdf_reset_index} where A > 1",
          index_col=["index1", "index2"],
          psdf_reset_index=psdf_reset_index,
      )
      expected = psdf.iloc[[1, 2]]
      assertDataFrameEqual(actual, expected)
  
file_path: spark/python/pyspark/pandas/tests/test_sql.py
imports: from pyspark import pandas
  from pyspark.errors import ParseException
  from pyspark.testing.pandasutils import PandasOnSparkTestCase
  from pyspark.testing.sqlutils import SQLTestUtils
  from pyspark.testing.utils import assertDataFrameEqual
label_desc: Use image node_id 4 for calling the SQLTestsMixin obj's underlying member method code with example usage: obj.test_sql_with_index_col() without return types