def METHOD_NAME( cpuLimits, period_us=100000, seconds=10 ):
    """Example/test of link and CPU bandwidth limits
       cpu: cpu limit as fraction of overall CPU time"""
    topo = TreeTopo( depth=1, fanout=2 )
    results = {}
    for sched in 'rt', 'cfs':
        info( '*** Testing with', sched, 'bandwidth limiting\n' )
        for cpu in cpuLimits:
            # cpu is the cpu fraction for all hosts, so we divide
            # it across two hosts
            host = custom( CPULimitedHost, sched=sched,
                           period_us=period_us,
                           cpu=.5*cpu )
            try:
                net = Mininet( topo=topo, host=host, waitConnected=True )
            # pylint: disable=bare-except
            except:  # noqa
                info( '*** Skipping scheduler %s and cleaning up\n' % sched )
                cleanup()
                break
            net.start()
            net.pingAll()
            hosts = [ net.getNodeByName( h ) for h in topo.hosts() ]
            client, server = hosts[ 0 ], hosts[ -1 ]
            info( '*** Starting iperf with %d%% of CPU allocated to hosts\n' %
                  ( 100.0 * cpu ) )
            # We measure at the server because it doesn't include
            # the client's buffer fill rate
            popen = server.popen( 'iperf -yc -s -p 5001' )
            waitListening( client, server, 5001 )
            client.cmd( 'iperf -yc -t %s -c %s' % ( seconds, server.IP() ) )
            # ignore empty result from waitListening/telnet for old iperf
            svals = {}
            while not svals or int( svals[ 'rate' ] ) == 0:
                line = decode( popen.stdout.readline() )
                # Probably shouldn't depend on an internal method, but
                # this is the easiest way
                svals = Mininet._iperfVals(  # pylint: disable=protected-access
                    line, server.IP() )
            bps = float( svals[ 'rate' ] )
            popen.terminate()
            net.stop()
            updated = results.get( sched, [] )
            updated += [ ( cpu, bps ) ]
            results[ sched ] = updated
    return results