def METHOD_NAME(cls, ctx, op):
    if op.merge:
        return super().METHOD_NAME(ctx, op)
    old_env = os.environ.copy()
    envs = cls._build_envs(ctx, op)
    old_argv = sys.argv.copy()
    try:
        os.environ.update(envs)
        sys.argv = ["script"]
        sys.argv.extend(op.command_args)
        exec(op.code, cls._build_locals(ctx, op))
        if op.rank == 0:
            ctx[op.outputs[0].key] = {"status": "ok"}
        else:
            ctx[op.outputs[0].key] = {}
    finally:
        os.environ = old_env
        sys.argv = old_argv
        sys.stdout.flush()