code: def test_index_expand(df_expand):
      """Test output if `index_expand`"""
      actual = df_expand.pivot(
          index="id", columns="year", values="percentage"
      ).reindex(pd.Categorical([1, 2, 3], ordered=True))
      expected = df_expand.pivot_wider(
          "id",
          "year",
          "percentage",
          index_expand=True,
          flatten_levels=False,
      )
      assert_frame_equal(actual, expected)
  
imports: import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 33 for calling a global function with example usage: test_index_expand(df_expand) without return types