code: def _fuse_nodes(
      self, fuses: List[List[ChunkType]], fuse_cls: OperandType
  ) -> Tuple[List[List[ChunkType]], List[ChunkType]]:
      graph = self._graph
      fused_nodes = []
  
      for fuse in fuses:
          head_node = fuse[0]
          tail_node = fuse[-1]
  
          fused_chunk = build_fuse_chunk(
              fuse, fuse_cls, op_kw={"dtype": tail_node.dtype}
          ).data
          graph.add_node(fused_chunk)
          for node in graph.iter_successors(tail_node):
              graph.add_edge(fused_chunk, node)
          for node in graph.iter_predecessors(head_node):
              graph.add_edge(node, fused_chunk)
          for node in fuse:
              graph.remove_node(node)
          fused_nodes.append(fused_chunk)
  
          try:
              # check tail node if it's in results
              i = graph.results.index(tail_node)
              graph.results[i] = fused_chunk
          except ValueError:
              pass
  
      return fuses, fused_nodes
  
file_path: mars/mars/optimization/physical/core.py
imports: from abc import ABC, abstractmethod
  from typing import List, Tuple, Dict, Type
  from ...core import ChunkGraph, ChunkType, OperandType
  from ...utils import build_fuse_chunk
label_desc: Use image node_id 4 for calling the RuntimeOptimizer obj's underlying member method code with example usage: obj._fuse_nodes(fuses, fuse_cls) and returns: fuses,  fused_nodes