def print_pairwise(pw, median = False):
names = sorted(set([i for i in pw]))<EOL>if len(names) != <NUM_LIT:0>:<EOL><INDENT>if '<STR_LIT:>>' in names[<NUM_LIT:0>]:<EOL><INDENT>yield ['<STR_LIT:#>'] + [i.split('<STR_LIT:>>')[<NUM_LIT:1>] for i in names if '<STR_LIT:>>' in i]<EOL><DEDENT>else:<EOL><INDENT>yield ['<STR_LIT:#>'] + names<EOL><DEDENT>for a in names:<EOL><INDENT>if '<STR_LIT:>>' in a:<EOL><INDENT>yield [a.split('<STR_LIT:>>')[<NUM_LIT:1>]] + [pw[a][b] for b in names]<EOL><DEDENT>else:<EOL><INDENT>out = []<EOL>for b in names:<EOL><INDENT>if b in pw[a]:<EOL><INDENT>if median is False:<EOL><INDENT>out.append(max(pw[a][b]))<EOL><DEDENT>else:<EOL><INDENT>out.append(np.median(pw[a][b]))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>out.append('<STR_LIT:->')<EOL><DEDENT><DEDENT>yield [a] + out<EOL><DEDENT><DEDENT><DEDENT>
print matrix of pidents to stdout