code: def _gen_chunk_key(cls, chunk, trunc_key):
      if "_" in chunk.key:
          key, index = chunk.key.split("_", 1)
          return "_".join([key[:trunc_key], index])
      else:  # pragma: no cover
          return chunk.key[:trunc_key]
  
file_path: mars/mars/services/task/supervisor/graph_visualizer.py
imports: import itertools
  from io import StringIO
  from typing import Dict, List
  from ....core.operand import Fetch, FetchShuffle
  from ...subtask import Subtask, SubtaskGraph
label_desc: Use image node_id 2 for calling the GraphVisualizer obj's underlying member method code with example usage: obj._gen_chunk_key(cls, chunk, trunc_key) and returns: str, chunk