def buildTopo(topos, topoStr):
 (topo, args, kwargs) = splitArgs(topoStr)
 if (topo not in topos):
  raise Exception(('Invalid topo name %s' % topo))
 return topos[topo](*args, **kwargs)

def buildTopo ( topos , topoStr ) : ( topo , args , kwargs ) = splitArgs ( topoStr ) if ( topo not in topos ) : raise Exception ( ( 'Invalid topo name %s' % topo ) ) return topos [ topo ] ( * args , ** kwargs )
create topology from string with format .