def print_table(title, headers, rows, sort_columns=None):
    if sort_columns is not None:
        if isinstance(sort_columns, int):
            rows = sorted(rows, key=itemgetter(sort_columns))
        elif isinstance(sort_columns, (list, tuple)):
            rows = sorted(rows, key=itemgetter(*sort_columns))
        else:
            assert False, "Sort_columns must be int or list/tuple of int"
    if title:
        print('\n%s:' % title)
    else:
        print('')
    print(tabulate.tabulate(rows, headers, tablefmt='simple'))
    print('')