def launch_task(self, task_id, executable, *args, **kwargs):
self.tasks[task_id]['<STR_LIT>'] = datetime.datetime.now()<EOL>hit, memo_fu = self.memoizer.check_memo(task_id, self.tasks[task_id])<EOL>if hit:<EOL><INDENT>logger.info("<STR_LIT>".format(task_id))<EOL>return memo_fu<EOL><DEDENT>executor_label = self.tasks[task_id]["<STR_LIT>"]<EOL>try:<EOL><INDENT>executor = self.executors[executor_label]<EOL><DEDENT>except Exception:<EOL><INDENT>logger.exception("<STR_LIT>".format(task_id, executor_label, self._config))<EOL><DEDENT>if self.monitoring is not None and self.monitoring.resource_monitoring_enabled:<EOL><INDENT>executable = self.monitoring.monitor_wrapper(executable, task_id,<EOL>self.monitoring.monitoring_hub_url,<EOL>self.run_id,<EOL>self.monitoring.resource_monitoring_interval)<EOL><DEDENT>with self.submitter_lock:<EOL><INDENT>exec_fu = executor.submit(executable, *args, **kwargs)<EOL><DEDENT>self.tasks[task_id]['<STR_LIT:status>'] = States.launched<EOL>if self.monitoring is not None:<EOL><INDENT>task_log_info = self._create_task_log_info(task_id, '<STR_LIT>')<EOL>self.monitoring.send(MessageType.TASK_INFO, task_log_info)<EOL><DEDENT>exec_fu.retries_left = self._config.retries -self.tasks[task_id]['<STR_LIT>']<EOL>logger.info("<STR_LIT>".format(task_id, executor.label))<EOL>return exec_fu<EOL>
Handle the actual submission of the task to the executor layer.

        If the app task has the executors attributes not set (default=='all')
        the task is launched on a randomly selected executor from the
        list of executors. This behavior could later be updated to support
        binding to executors based on user specified criteria.

        If the app task specifies a particular set of executors, it will be
        targeted at those specific executors.

        Args:
            task_id (uuid string) : A uuid string that uniquely identifies the task
            executable (callable) : A callable object
            args (list of positional args)
            kwargs (arbitrary keyword arguments)


        Returns:
            Future that tracks the execution of the submitted executable