class_docstr: An subtask graph builder which build subtask graph for chunk graph based on passed band_resource.
  
  If push shuffle is used, this builder will validate predecessors orders consistency of ShuffleProxy between
  chunk graph and generated subtask graph.
code: def __init__(
      self,
      chunk_graph: ChunkGraph,
      band_resource: Dict[BandType, Resource],
      task: Task,
      config: Config,
      chunk_to_subtasks: Dict[ChunkType, Subtask],
      graph_assigner_cls: Type[AbstractGraphAssigner] = None,
      stage_id: str = None,
      map_reduce_id_to_infos: Dict[int, MapReduceInfo] = None,
      shuffle_fetch_type: ShuffleFetchType = ShuffleFetchType.FETCH_BY_KEY,
  ):
      self._chunk_graph = chunk_graph
      self._final_result_chunks_set = set(
          self._chunk_graph.result_chunks
      )
      self._band_resource = band_resource
      self._task = task
      self._stage_id = stage_id
      self._config = config
      self._shuffle_fetch_type = shuffle_fetch_type
      self._has_shuffle = any(
          isinstance(c.op, MapReduceOperand) for c in self._chunk_graph
      )
      self._fuse_enabled = task.fuse_enabled
      self._extra_config = task.extra_config
      self._chunk_to_subtasks = chunk_to_subtasks
      self._map_reduce_id_to_infos = map_reduce_id_to_infos
      if graph_assigner_cls is None:
          graph_assigner_cls = GraphAssigner
      self._graph_assigner_cls = graph_assigner_cls
      self._chunk_to_copied = dict()
      self._logic_key_generator = LogicKeyGenerator()
  
imports: import itertools
  import logging
  from collections import deque, defaultdict
  from typing import Dict, List, Tuple, Type, Union
  from ....config import Config
  from ....core import ChunkGraph, ChunkType, enter_mode, DAG
  from ....core.operand import Fetch, VirtualOperand, LogicKeyGenerator, MapReduceOperand, OperandStage, ShuffleProxy, ShuffleFetchType
  from ....lib.ordered_set import OrderedSet
  from ....resource import Resource
  from ....typing import BandType, OperandType
  from ....utils import build_fetch, build_fetch_shuffle, tokenize
  from ...subtask import SubtaskGraph, Subtask
  from ..core import Task, new_task_id, MapReduceInfo
  from .assigner import AbstractGraphAssigner, GraphAssigner
  from .fusion import Coloring
label_desc: Use image node_id 1 to create a new GraphAnalyzer object  with example: obj = GraphAnalyzer(chunk_graph, band_resource, task, config, chunk_to_subtasks, graph_assigner_cls, stage_id, map_reduce_id_to_infos, shuffle_fetch_type)