brainstorm/structure/layout.py
def merge_connections(connections, forced_orders):
    """
    Replace connection nodes with forced order lists if they are part of it.
    """
    merged_connections = []
    for start, stop in connections:
        for fo in forced_orders:
            if start in fo:
                start = fo
            if stop in fo:
                stop = fo
        merged_connections.append((start, stop))
    return merged_connections

    Replace connection nodes with forced order lists if they are part of it.
    
Replace connection nodes with forced order lists if they are part of it.
Replace connection nodes with forced order lists if they are part of it .
def merge_connections(connections, forced_orders):
    merged_connections = []
    for start, stop in connections:
        for fo in forced_orders:
            if start in fo:
                start = fo
            if stop in fo:
                stop = fo
        merged_connections.append((start, stop))
    return merged_connections
def merge_connections ( connections , forced_orders ) : merged_connections = [ ] for start , stop in connections : for fo in forced_orders : if start in fo : start = fo if stop in fo : stop = fo merged_connections . append ( ( start , stop ) ) return merged_connections
Replace connection nodes with forced order lists if they are part of it.
Replace connection nodes with forced order lists if they are part of it .
"""
    Replace connection nodes with forced order lists if they are part of it.
    """
connections
forced_orders