def METHOD_NAME(
    multiindex_dataframe,
    strip_underscores,
):
    """Tests clean_names `strip_underscores` param on a multi-index
    dataframe.
    """
    if strip_underscores in ["right", "r"]:
        df = multiindex_dataframe.rename(columns=lambda x: x + "_")
    elif strip_underscores in ["left", "l"]:
        df = multiindex_dataframe.rename(columns=lambda x: "_" + x)
    elif strip_underscores in ["both", None]:
        df = multiindex_dataframe.rename(columns=lambda x: "_" + x + "_")
    else:
        df = multiindex_dataframe
    df = df.clean_names(strip_underscores=strip_underscores)
    levels = [
        ["a", "bell_chart", "decorated_elephant"],
        ["b", "normal_distribution", "r_i_p_rhino"],
    ]
    codes = [[1, 0, 2], [1, 0, 2]]
    expected_columns = pd.MultiIndex(levels=levels, codes=codes)
    assert set(df.columns) == set(expected_columns)