def max_name_width(service_names, max_index_width=3):
 return (max((len(name) for name in service_names)) + max_index_width)

def max_name_width ( service_names , max_index_width = 3 ) : return ( max ( ( len ( name ) for name in service_names ) ) + max_index_width )
calculate the maximum width of container names so we can make the log prefixes line up like so: db_1 | listening web_1 | listening .