def format_output(instances, flag):
    out = []
    line_format = '{0}\t{1}\t{2}\t{3}\t{4}'
    name_len = _get_max_name_len(instances) + 3
    if flag:
        line_format = '{0:<' + str(name_len) + '}{1:<14}{2:<13}{3:<16}{4:<16}'

    for i in instances:
        tag_name = get_tag_value(i.tags, 'Name')
        out.append(line_format.format(
            tag_name, i.state['Name'], i.id, i.private_ip_address, str(i.public_ip_address)))
    return out
pseudo-disconnect - remove the connection if it exists
dataset/ETHPy150Open achiku/jungle/jungle/ec2.py/format_output--crossover with--dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/InteractiveLobeSegmentation/InteractiveLobeSegmentation.py/ILSpqWidget.disconnect