def METHOD_NAME(pxie_2597, pxie_2597_with_name_map):
    for instr in [pxie_2597, pxie_2597_with_name_map]:
        com = instr.channels.com
        for ch in instr.channels:
            if ch is com:
                continue
            for ch_to_disconnect in [ch, com]:
                com.connect_to(ch)
                assert ch.connections() == ["com"]
                ch_to_disconnect.disconnect_from_all()
                assert ch.connections() == []
                assert com.connections() == []