def METHOD_NAME(args, env):
    epilog = "Checks username bucketing for experiments and generates names for each experiment bucket.  Derived names include the base user name, experiment abbreviation, bucket number, and a short random string, separated with hyphens.  (v1.0)"
    parser = argparse.ArgumentParser(epilog=epilog)
    parser.add_argument(
        "exp",
        metavar="EXPERIMENT",
        help="Experiment to bucket for.",
    )
    parser.add_argument(
        "user",
        nargs="?",
        default=env.get("USER", ""),
        metavar="NAME",
        help="Base user name for bucketing, default is $USER.",
    )
    parser.add_argument(
        "-a", "--abbrev",
        metavar="EXP",
        help="Experiment abbreviation for name generation.",
    )
    parser.add_argument(
        "-b", "--buckets",
        nargs="+",
        type=int,
        metavar="X",
        help="Buckets to make names for, default is all buckets.",
    )
    parser.add_argument(
        "-c", "--check-only",
        action="store_true",
        help="Just check what bucket the user is in, don't generate names.",
    )
    parser.add_argument(
        "-n", "--number",
        type=int,
        default=2,
        metavar="N",
        help="Number of buckets, default is 2.",
    )
    parser.add_argument(
        "--print-args",
        action="store_true",
        # help="Print arguments and computations, then exit.",
        help=argparse.SUPPRESS,
    )
    my_args = parser.parse_args(sys.argv[1:])
    bucket_number = my_args.number
    hashed = hash_exp(my_args.exp, my_args.user)
    digest = bucket_int(hashed)
    bucket = digest % bucket_number
    abbrev = my_args.abbrev
    if abbrev is None:
        abbrev = abbreviate(my_args.exp)
    print(
        "For experiment {exp}, {user} is in bucket: {bucket}".format(
            exp=my_args.exp,
            user=my_args.user,
            bucket=bucket,
        )
    )
    if my_args.print_args:
        print("* Args:\n\t{my_args}\n* Computed:\n\tdigest: {digest} - hash: {hashed} - {abbrev}".format(**vars()))
        return 0
    if my_args.check_only:
        return 0
    bucket_list = my_args.buckets
    if not bucket_list:
        bucket_list = range(bucket_number)
    # TODO: validate more of the arguments
    # HACK: currently not enforcing the naming rules:
    # - Username must be between 2 and 30 characters long.
    # - Usernames can only contain letters (A-Z, a-z), numerals (0-9), underscores (_), and hyphens (-).)
    print("Generated names:")
    for i in bucket_list:
        if i >= bucket_number:
            print("    (Skipped {i}, experiment only has {bucket_number} buckets)".format(**vars()))
            continue
        print("    " + name_for(i, abbrev, my_args.exp, my_args.user, bucket_number))
    return 0