def reconfigure_passwords(names_to_parse,force=False):
    names_to_parse = set(names_to_parse)
    whoami = getpass.getuser()

    # Some names need to be run as root. Here we disentangle, and launch
    # a subprocess as root for those that do.
    privileged_names = names_to_parse.intersection(['global','root'])
    unprivileged_names = names_to_parse.intersection(['admin'])

    if len(privileged_names) > 0 and whoami != "root":
        # Some of these can only be automatically upgraded as root, probably.
        # We could try-catch this, I guess, but it's such a tiny set right now.
        print "Using sudo to process password change(s) for " + " and ".join(list(privileged_names)) + ". The system may now request your root password." 
        subprocess.call(["sudo","bookworm","config","mysql","--users"] + list(privileged_names))
        names_to_parse = unprivileged_names

    if "admin" in names_to_parse and whoami=="root":
        if not args.force:
            print "You're trying to update the admin user while logged in as root (using sudo?)" 
            print "That's confusing to me; if you're only going to run admin operations as root,"
            print "just set the root password."

    for name in names_to_parse:
        update_settings_for(name)
ndindex(*shape)
dataset/ETHPy150Open Bookworm-project/BookwormDB/bookwormDB/configuration.py/reconfigure_passwords--crossover with--dataset/ETHPy150Open numba/numba/numba/targets/arrayobj.py/make_array_ndindex