def METHOD_NAME(self, scriptfile, node):
    cmd = CommandLine(
        "bsub",
        environ=dict(os.environ),
        resource_monitor=False,
        terminal_output="allatonce",
    )
    bsubargs = ""
    if self._bsub_args:
        bsubargs = self._bsub_args
    if "bsub_args" in node.plugin_args:
        if "overwrite" in node.plugin_args and node.plugin_args["overwrite"]:
            bsubargs = node.plugin_args["bsub_args"]
        else:
            bsubargs += " " + node.plugin_args["bsub_args"]
    if "-o" not in bsubargs:  # -o outfile
        bsubargs = "{} -o {}".format(bsubargs, scriptfile + ".log")
    if "-e" not in bsubargs:
        # -e error file
        bsubargs = "{} -e {}".format(bsubargs, scriptfile + ".log")
    if node._hierarchy:
        jobname = ".".join((dict(os.environ)["LOGNAME"], node._hierarchy, node._id))
    else:
        jobname = ".".join((dict(os.environ)["LOGNAME"], node._id))
    jobnameitems = jobname.split(".")
    jobnameitems.reverse()
    jobname = ".".join(jobnameitems)
    cmd.inputs.args = "{} -J {} sh {}".format(
        bsubargs,
        jobname,
        scriptfile,
    )  # -J job_name_spec
    logger.debug("bsub " + cmd.inputs.args)
    oldlevel = iflogger.level
    iflogger.setLevel(logging.getLevelName("CRITICAL"))
    tries = 0
    while True:
        try:
            result = cmd.run()
        except Exception as e:
            if tries < self._max_tries:
                tries += 1
                sleep(self._retry_timeout)  # sleep 2 seconds and try again.
            else:
                iflogger.setLevel(oldlevel)
                raise RuntimeError(
                    "\n".join(
                        (
                            "Could not submit lsf task for node %s" % node._id,
                            str(e),
                        )
                    )
                )
        else:
            break
    iflogger.setLevel(oldlevel)
    # retrieve lsf taskid
    match = re.search(r"<(\d*)>", result.runtime.stdout)
    if match:
        taskid = int(match.groups()[0])
    else:
        raise OSError(
            "Can't parse submission job output id: %s" % result.runtime.stdout
        )
    self._pending[taskid] = node.output_dir()
    logger.debug("submitted lsf task: %d for node %s" % (taskid, node._id))
    return taskid