code: def test_names_glue_multiple_levels(df_checks_output):
      """
      Test output with names_glue for multiple levels.
      """
  
      df_out = pd.DataFrame(
          {
              "geoid": [1, 13],
              "name": ["Alabama", "Georgia"],
              "pop_renter_estimate": [1434765, 3592422],
              "median_rent_estimate": [747, 927],
              "pop_renter_error": [16736, 33385],
              "median_rent_error": [3, 3],
          }
      )
  
      result = df_checks_output.encode_categorical(
          variable="appearance"
      ).pivot_wider(
          index=["geoid", "name"],
          names_from="variable",
          values_from=["estimate", "error"],
          names_glue="{variable}_{_value}",
          reset_index=False,
      )
      assert_frame_equal(result, df_out.set_index(["geoid", "name"]))
  
imports: import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 27 for calling a global function with example usage: test_names_glue_multiple_levels(df_checks_output) without return types