<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unstack(df, level=-1, reset_index=True):
 """pd.DataFrame.unstack adapter. Call the `df.unstack` method using the indicated level and afterwards join the column names using an underscore. Args: df (pandas.DataFrame):
 DataFrame to unstack. level (str, int or list):
 Level(s) of index to unstack, can pass level name reset_index (bool):
 Whether to reset the index after unstacking Returns: pandas.Dataframe: unstacked dataframe """

    df = df.unstack(level=level)
    if reset_index:
        df = df.reset_index()
        df.columns = df.columns.map(_join_names)

    return df