def METHOD_NAME():
    global devnull
    devnull = open(os.devnull, 'rb')
    argparser = optparse.OptionParser(
        usage="Usage: %prog [options] <noderange> <command expression>",
        epilog="Expressions are the same as in attributes, e.g. "
               "'ipmitool -H {hardwaremanagement.manager}' will be expanded.")
    argparser.add_option('-f', '-c', '--count', type='int', default=168,
                         help='Number of commands to run at a time')
    argparser.add_option('-n', '--nonodeprefix', action='store_true',
                         help='Do not prefix output with node names')
    argparser.add_option('-m', '--maxnodes', type='int',
                     help='Specify a maximum number of '
                          'nodes to run the command with, '
                          'prompting if over the threshold')                           
    # among other things, FD_SETSIZE limits.  Besides, spawning too many
    # processes can be unkind for the unaware on memory pressure and such...
    argparser.disable_interspersed_args()
    (options, args) = argparser.parse_args()
    if len(args) < 2:
        argparser.print_help()
        sys.exit(1)
    concurrentprocs = options.count
    client.check_globbing(args[0])
    c = client.Command()
    cmdstr = " ".join(args[1:])
    currprocs = 0
    all = set([])
    pipedesc = {}
    pendingexecs = deque()
    exitcode = 0
    c.stop_if_noderange_over(args[0], options.maxnodes)
    for exp in c.create('/noderange/{0}/attributes/expression'.format(args[0]),
                        {'expression': cmdstr}):
        if 'error' in exp:
            sys.stderr.write(exp['error'] + '\n')
            exitcode |= exp.get('errorcode', 1)
        ex = exp.get('databynode', ())
        for node in ex:
            cmd = ex[node]['value']
            if not isinstance(cmd, bytes) and not isinstance(cmd, str):
                cmd = cmd.encode('utf-8')
            cmdv = shlex.split(cmd)
            if currprocs < concurrentprocs:
                currprocs += 1
                run_cmdv(node, cmdv, all, pipedesc)
            else:
                pendingexecs.append((node, cmdv))
    if not all or exitcode:
        sys.exit(exitcode)
    rdy, _, _ = select.select(all, [], [], 10)
    while all:
        pernodeout = {}
        for r in rdy:
            desc = pipedesc[r]
            node = desc['node']
            data = True
            while data and select.select([r], [], [], 0)[0]:
                data = r.readline()
                if data:
                    if desc['type'] == 'stdout':
                        if node not in pernodeout:
                            pernodeout[node] = []
                        pernodeout[node].append(data)
                    else:
                        data = client.stringify(data)
                        if options.nonodeprefix:
                            sys.stderr.write(data)
                        else:
                            sys.stderr.write('{0}: {1}'.format(node, data))
                        sys.stderr.flush()
                else:
                    pop = desc['popen']
                    ret = pop.poll()
                    if ret is not None:
                        exitcode = exitcode | ret
                        all.discard(r)
                        r.close()
                        if desc['type'] == 'stdout' and pendingexecs:
                            node, cmdv = pendingexecs.popleft()
                            run_cmdv(node, cmdv, all, pipedesc)
        for node in sortutil.natural_sort(pernodeout):
            for line in pernodeout[node]:
                line = client.stringify(line)
                if options.nonodeprefix:
                    sys.stdout.write(line)
                else:
                    sys.stdout.write('{0}: {1}'.format(node, line))
        sys.stdout.flush()
        if all:
            rdy, _, _ = select.select(all, [], [], 10)
    sys.exit(exitcode)