class_docstr: This class is responsible for gathering all user-specified configuration options, parsing them,
  instantiating a GraphManager and then starting that GraphManager with either improve() or evaluate().
  This class is also responsible for launching multiple processes.
  It is structured so that it can be sub-classed to provide alternate mechanisms to configure and launch
  Coach jobs.
  
  The key entry-point for this class is the .launch() method which is expected to be called from __main__
  and handle absolutely everything for a job.
class_docstr_tok: ["This","class","is","responsible","for","gathering","all","user-specified","configuration","options",",","parsing","them",",","instantiating","a","GraphManager","and","then","starting","that","GraphManager","with","either","improve","(",")","or","evaluate","(",")",".","This","class","is","also","responsible","for","launching","multiple","processes",".","It","is","structured","so","that","it","can","be","sub-classed","to","provide","alternate","mechanisms","to","configure","and","launch","Coach","jobs",".","The","key","entry-point","for","this","class","is","the",".launch","(",")","method","which","is","expected","to","be","called","from","__main__","and","handle","absolutely","everything","for","a","job","."]
code: def create_task_parameters(
      graph_manager: "GraphManager", args: argparse.Namespace
  ):
      if (
          args.distributed_coach
          and not graph_manager.agent_params.algorithm.distributed_coach_synchronization_type
      ):
          screen.error(
              "{} algorithm is not supported using distributed Coach.".format(
                  graph_manager.agent_params.algorithm
              )
          )
  
      if (
          args.distributed_coach
          and args.checkpoint_save_secs
          and graph_manager.agent_params.algorithm.distributed_coach_synchronization_type
          == DistributedCoachSynchronizationType.SYNC
      ):
          screen.warning(
              "The --checkpoint_save_secs or -s argument will be ignored as SYNC distributed coach sync type is used. Checkpoint will be saved every training iteration."
          )
  
      if (
          args.distributed_coach
          and not args.checkpoint_save_secs
          and graph_manager.agent_params.algorithm.distributed_coach_synchronization_type
          == DistributedCoachSynchronizationType.ASYNC
      ):
          screen.error(
              "Distributed coach with ASYNC distributed coach sync type requires --checkpoint_save_secs or -s."
          )
  
      # Intel optimized TF seems to run significantly faster when limiting to a single OMP thread.
      # This will not affect GPU runs.
      os.environ["OMP_NUM_THREADS"] = "1"
  
      # turn TF debug prints off
      if args.framework == Frameworks.tensorflow:
          os.environ["TF_CPP_MIN_LOG_LEVEL"] = str(args.tf_verbosity)
  
      # turn off the summary at the end of the run if necessary
      if not args.no_summary and not args.distributed_coach:
          atexit.register(logger.summarize_experiment)
          screen.change_terminal_title(args.experiment_name)
  
      if (
          args.checkpoint_restore_dir is not None
          and args.checkpoint_restore_file is not None
      ):
          raise ValueError(
              "Only one of the checkpoint_restore_dir and checkpoint_restore_file arguments can be used"
              " simulatenously."
          )
      checkpoint_restore_path = (
          args.checkpoint_restore_dir
          if args.checkpoint_restore_dir
          else args.checkpoint_restore_file
      )
  
      # open dashboard
      if args.open_dashboard:
          open_dashboard(args.experiment_path)
  
      if (
          args.distributed_coach
          and args.distributed_coach_run_type == RunType.ORCHESTRATOR
      ):
          exit(handle_distributed_coach_orchestrator(args))
  
      task_parameters = TaskParameters(
          framework_type=args.framework,
          evaluate_only=args.evaluate,
          experiment_path=args.experiment_path,
          seed=args.seed,
          use_cpu=args.use_cpu,
          checkpoint_save_secs=args.checkpoint_save_secs,
          checkpoint_restore_path=checkpoint_restore_path,
          checkpoint_save_dir=args.checkpoint_save_dir,
          export_onnx_graph=args.export_onnx_graph,
          apply_stop_condition=args.apply_stop_condition,
      )
  
      return task_parameters
  
imports: import sys
  import copy
  from configparser import ConfigParser, Error
  import os
  from rl_coach import logger
  import traceback
  from rl_coach.logger import screen, failed_imports
  import argparse
  import atexit
  import time
  import sys
  import json
  from rl_coach.base_parameters import Frameworks, VisualizationParameters, TaskParameters, DistributedTaskParameters, RunType, DistributedCoachSynchronizationType
  from rl_coach.core_types import TotalStepsCounter, RunPhase, PlayingStepsType, TrainingSteps, EnvironmentEpisodes, EnvironmentSteps, StepMethod, Transition
  from multiprocessing import Process
  from multiprocessing.managers import BaseManager
  import subprocess
  from glob import glob
  from rl_coach.graph_managers.graph_manager import HumanPlayScheduleParameters, GraphManager
  from rl_coach.utils import list_all_presets, short_dynamic_import, get_open_port, SharedMemoryScratchPad, get_base_dir, set_gpu
  from rl_coach.graph_managers.basic_rl_graph_manager import BasicRLGraphManager
  from rl_coach.environments.environment import SingleLevelSelection
  from rl_coach.memories.backend.redis import RedisPubSubMemoryBackendParameters
  from rl_coach.memories.backend.memory_impl import construct_memory_params
  from rl_coach.data_stores.data_store import DataStoreParameters
  from rl_coach.data_stores.s3_data_store import S3DataStoreParameters
  from rl_coach.data_stores.nfs_data_store import NFSDataStoreParameters
  from rl_coach.data_stores.redis_data_store import RedisDataStoreParameters
  from rl_coach.data_stores.data_store_impl import get_data_store, construct_data_store_params
  from rl_coach.training_worker import training_worker
  from rl_coach.rollout_worker import rollout_worker
  from rl_coach.schedules import *
  from rl_coach.exploration_policies.e_greedy import *
label_desc: Use image node_id 8 for calling the CoachLauncher obj's underlying member method code with example usage: obj.create_task_parameters(graph_manager, args) and returns: task_parameters