code: def df_levels(request, df):
      """DataFrame with columns or index levels 'L1', 'L2', and 'L3'"""
      levels = request.param
  
      if levels:
          df = df.set_index(levels)
  
      return df
  
imports: import pytest
  from pandas.core.dtypes.missing import array_equivalent
  import pandas
label_desc: Use image node_id 2 for calling a global function with example usage: df_levels(request, df) and returns: df