'Find the max length for each field.'

def __find_justified_fmt(self, items, keys):

    lens = {}
    if (not items):
        print 'No    results'
        return
    for key in keys[:(-1)]:
        lens[key] = max((len(self.__conv_value(key, _get_item_key(item, key))) for item in items))
        lens[key] = max(lens[key], len(KEYS_TO_NAMES_EN[key]))
    lens[keys[(-1)]] = 0
    return '        '.join([('%%-%ds' % lens[key]) for key in keys])
