code: def test_names_expand(df_expand):
      """Test output if `names_expand`"""
      actual = df_expand.pivot(
          index="year", columns="id", values="percentage"
      ).reindex(columns=pd.Categorical([1, 2, 3], ordered=True))
      expected = df_expand.pivot_wider(
          "year",
          "id",
          "percentage",
          names_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 31 for calling a global function with example usage: test_names_expand(df_expand) without return types