def METHOD_NAME(self, proxy_cmd):
    # environment variables to set
    env = self._get_env()
    # add staging directories
    if self.stagein_info:
        env["LAW_SANDBOX_STAGEIN_DIR"] = self.stagein_info.stage_dir.path
    if self.stageout_info:
        env["LAW_SANDBOX_STAGEOUT_DIR"] = self.stageout_info.stage_dir.path
    # get the bash command
    bash_cmd = self._bash_cmd()
    # build commands to setup the environment
    setup_cmds = self._build_setup_cmds(env)
    # build script variable exports
    export_cmds = self._build_setup_cmds(collections.OrderedDict(
        ("LAW_CMSSW_{}".format(attr.upper()), value)
        for attr, value in zip(self.variables._fields, self.variables)
    ))
    # handle local scheduling within the container
    if self.force_local_scheduler():
        proxy_cmd.add_arg("--local-scheduler", "True", overwrite=True)
    # build the final command
    METHOD_NAME = quote_cmd(bash_cmd + ["-c", " && ".join(flatten(
        export_cmds,
        "source \"{}\" \"\"".format(self.script),
        setup_cmds,
        proxy_cmd.build(),
    ))])
    return METHOD_NAME