code: def test_creation_index_same_anchor(self):
      pdf = pd.DataFrame(
          {
              "a": [1, 2, None, 4],
              "b": [1, None, None, 4],
              "c": [1, 2, None, None],
              "d": [None, 2, None, 4],
          }
      )
      psdf = ps.from_pandas(pdf)
  
      self.assert_eq(
          ps.DataFrame(data=psdf, index=psdf.index),
          pd.DataFrame(data=pdf, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf + 1, index=psdf.index),
          pd.DataFrame(data=pdf + 1, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf[["a", "c"]] * 2, index=psdf.index),
          pd.DataFrame(data=pdf[["a", "c"]] * 2, index=pdf.index),
      )
  
      # test String Index
      pdf = pd.DataFrame(
          data={
              "s": ["Hello", "World", "Databricks"],
              "x": [2002, 2003, 2004],
              "y": [4, 5, 6],
          }
      )
      pdf = pdf.set_index("s")
      pdf.index.name = None
      psdf = ps.from_pandas(pdf)
  
      self.assert_eq(
          ps.DataFrame(data=psdf, index=psdf.index),
          pd.DataFrame(data=pdf, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf + 1, index=psdf.index),
          pd.DataFrame(data=pdf + 1, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf[["y"]] * 2, index=psdf.index),
          pd.DataFrame(data=pdf[["y"]] * 2, index=pdf.index),
      )
  
      # test DatetimeIndex
      pdf = pd.DataFrame(
          data={
              "t": [
                  datetime(2022, 9, 1, 0, 0, 0, 0),
                  datetime(2022, 9, 2, 0, 0, 0, 0),
                  datetime(2022, 9, 3, 0, 0, 0, 0),
              ],
              "x": [2002, 2003, 2004],
              "y": [4, 5, 6],
          }
      )
      pdf = pdf.set_index("t")
      pdf.index.name = None
      psdf = ps.from_pandas(pdf)
  
      self.assert_eq(
          ps.DataFrame(data=psdf, index=psdf.index),
          pd.DataFrame(data=pdf, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf + 1, index=psdf.index),
          pd.DataFrame(data=pdf + 1, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf[["y"]] * 2, index=psdf.index),
          pd.DataFrame(data=pdf[["y"]] * 2, index=pdf.index),
      )
  
      # test TimedeltaIndex
      pdf = pd.DataFrame(
          data={
              "t": [
                  timedelta(1),
                  timedelta(3),
                  timedelta(5),
              ],
              "x": [2002, 2003, 2004],
              "y": [4, 5, 6],
          }
      )
      pdf = pdf.set_index("t")
      pdf.index.name = None
      psdf = ps.from_pandas(pdf)
  
      self.assert_eq(
          ps.DataFrame(data=psdf, index=psdf.index),
          pd.DataFrame(data=pdf, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf + 1, index=psdf.index),
          pd.DataFrame(data=pdf + 1, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf[["y"]] * 2, index=psdf.index),
          pd.DataFrame(data=pdf[["y"]] * 2, index=pdf.index),
      )
  
      # test CategoricalIndex
      pdf = pd.DataFrame(
          data={
              "z": [-1, -2, -3, -4],
              "x": [2002, 2003, 2004, 2005],
              "y": [4, 5, 6, 7],
          },
          index=pd.CategoricalIndex(
              ["a", "c", "b", "a"], categories=["a", "b", "c"]
          ),
      )
      psdf = ps.from_pandas(pdf)
  
      self.assert_eq(
          ps.DataFrame(data=psdf, index=psdf.index),
          pd.DataFrame(data=pdf, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf + 1, index=psdf.index),
          pd.DataFrame(data=pdf + 1, index=pdf.index),
      )
      self.assert_eq(
          ps.DataFrame(data=psdf[["y"]] * 2, index=psdf.index),
          pd.DataFrame(data=pdf[["y"]] * 2, index=pdf.index),
      )
  
      # test distributed data with ps.MultiIndex
      pdf = pd.DataFrame(
          data={
              "z": [-1, -2, -3, -4],
              "x": [2002, 2003, 2004, 2005],
              "y": [4, 5, 6, 7],
          },
          index=pd.MultiIndex.from_tuples(
              [("a", "x"), ("b", "y"), ("c", "z"), ("a", "x")]
          ),
      )
      psdf = ps.from_pandas(pdf)
  
      err_msg = "Cannot combine a Distributed Dataset with a MultiIndex"
      with self.assertRaisesRegex(ValueError, err_msg):
          # test ps.DataFrame with ps.MultiIndex
          ps.DataFrame(data=psdf, index=psdf.index)
      with self.assertRaisesRegex(ValueError, err_msg):
          # test ps.DataFrame with pd.MultiIndex
          ps.DataFrame(data=psdf, index=pdf.index)
  
imports: from datetime import datetime, timedelta
  import unittest
  import numpy
  import pandas
  from pyspark import pandas
  from pyspark.pandas.typedef.typehints import extension_dtypes_available, extension_float_dtypes_available, extension_object_dtypes_available
  from pyspark.pandas.utils import is_testing
  from pyspark.testing.pandasutils import ComparisonTestBase
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 5 for calling the FrameConstructorMixin obj's underlying member method code with example usage: obj.test_creation_index_same_anchor() without return types