code: def _fuse_nodes(self, fuses: List[_Fuse], fuse_cls):
      graph = self._graph
      fused_nodes = []
  
      for fuse in fuses:
          fuse_graph = fuse.graph
          tail_nodes = fuse.tails
          head_nodes = fuse.heads
          inputs = [
              inp
              for n in head_nodes
              for inp in n.inputs
              if inp not in fuse_graph
          ]
  
          tail_chunk = tail_nodes[0]
          tail_chunk_op = tail_chunk.op
          fuse_op = fuse_cls(
              sparse=tail_chunk_op.sparse,
              gpu=tail_chunk_op.gpu,
              _key=tail_chunk_op.key,
              fuse_graph=fuse_graph,
              dtype=tail_chunk.dtype,
          )
          fused_chunk = fuse_op.new_chunk(
              inputs,
              kws=[tail_chunk.params],
              _key=tail_chunk.key,
              _chunk=tail_chunk,
          ).data
  
          graph.add_node(fused_chunk)
          for node in graph.iter_successors(tail_chunk):
              graph.add_edge(fused_chunk, node)
          for head_chunk in head_nodes:
              for node in graph.iter_predecessors(head_chunk):
                  if not fuse_graph.contains(node):
                      graph.add_edge(node, fused_chunk)
          for node in fuse_graph:
              graph.remove_node(node)
          fused_nodes.append(fused_chunk)
  
          try:
              # check tail node if it's in results
              i = graph.results.index(tail_chunk)
              graph.results[i] = fused_chunk
          except ValueError:
              pass
  
      return fuses, fused_nodes
  
file_path: mars/mars/optimization/physical/numexpr.py
imports: import dataclasses
  import functools
  import logging
  from typing import List, Set
  import numpy
  from ...core import ChunkType, ChunkGraph
  from ...tensor import arithmetic
  from ...tensor import reduction
  from ...tensor.fuse import TensorNeFuseChunk
  from ...tensor.fuse.numexpr import NUMEXPR_INSTALLED
  from .core import RuntimeOptimizer, register_optimizer
label_desc: Use image node_id 3 for calling the NumexprRuntimeOptimizer obj's underlying member method code with example usage: obj._fuse_nodes(fuses, fuse_cls) and returns: fuses,  fused_nodes