@Commands.command(
        'macro',
        help=[
            'Use mimicry to simulate macros.',
            '  macro M A B   <=>   mimic M-in1 M-in2 M-out A B'
        ],
        arguments=(
            Commands.Argument('macro_name', help='Name of the macro (look for <macro_name>-in1, ..., and <macro_name>-out bundles).'),
            Commands.Argument('bundles', help=BUNDLE_SPEC_FORMAT % 'Bundles: new_input_1 ... new_input_n (%s)', nargs='+', completer=BundlesCompleter),
        ) + MIMIC_ARGUMENTS,
    )
    def do_macro_command(self, args):
        """
        Just like do_mimic_command.
        """
        # For a macro, it's important that the name be not-null, so that we
        # don't create bundles called '<macro_name>-out', which would clash
        # next time we try to use the macro.
        if not args.name: args.name = 'new'
        # Reduce to the mimic case
        args.bundles = [args.macro_name + '-in' + str(i+1) for i in range(len(args.bundles))] + \
                       [args.macro_name + '-out'] + args.bundles
        self.mimic(args)
dataset/ETHPy150Open codalab/codalab-cli/codalab/lib/bundle_cli.py/BundleCLI.do_macro_command/swapped operands of `%`