def max_tb(collection): # pragma: no cover
    """Returns the maximum number of TB recorded in the collection"""
    max_TB = 0
    for doc in collection.find({}).sort([('total_TB',-1)]).limit(1):
        max_TB = doc['total_TB']
    return max_TB