code: def left_df(request, df1):
      """Construct left test DataFrame with specified levels
      (any of 'outer', 'inner', and 'v1')
      """
      levels = request.param
      if levels:
          df1 = df1.set_index(levels)
  
      return df1
  
file_path: pandas/pandas/tests/reshape/merge/test_merge_index_as_string.py
imports: import numpy
  import pytest
  from pandas import DataFrame
  import pandas._testing
label_desc: Use image node_id 3 for calling a global function with example usage: left_df(request, df1) and returns: df1