def get_max_median_position_concentration(positions):
expos = get_percent_alloc(positions)<EOL>expos = expos.drop('<STR_LIT>', axis=<NUM_LIT:1>)<EOL>longs = expos.where(expos.applymap(lambda x: x > <NUM_LIT:0>))<EOL>shorts = expos.where(expos.applymap(lambda x: x < <NUM_LIT:0>))<EOL>alloc_summary = pd.DataFrame()<EOL>alloc_summary['<STR_LIT>'] = longs.max(axis=<NUM_LIT:1>)<EOL>alloc_summary['<STR_LIT>'] = longs.median(axis=<NUM_LIT:1>)<EOL>alloc_summary['<STR_LIT>'] = shorts.median(axis=<NUM_LIT:1>)<EOL>alloc_summary['<STR_LIT>'] = shorts.min(axis=<NUM_LIT:1>)<EOL>return alloc_summary<EOL>
Finds the max and median long and short position concentrations
in each time period specified by the index of positions.

Parameters
----------
positions : pd.DataFrame
    The positions that the strategy takes over time.

Returns
-------
pd.DataFrame
    Columns are max long, max short, median long, and median short
    position concentrations. Rows are timeperiods.