def sort_by_median(medians, verbosity):
    """
    Make a list of taxonomic groups ordered by decreasing median median relative abundance

    Arguments:
        medians (dict) -- maps tax groups to their median median relative abundance across all samples
        verbosity (int) -- user defined parameter specifying whether or not to print rel abs of each tax group
    Returns:
        tax_order (list) -- names of tax groups in order of decreasing median median relative abundance
    """
    tax_order = []   
    for key, value in sorted(medians.items(), key=lambda x:x[1], reverse=True):
        tax_order.append(key)
        if verbosity > 0: print(key, value)
    
    return tax_order