code: def test_fuse_subgraphs_linear_chains_of_duplicate_deps():
      dsk = {
          "x-1": 1,
          "add-1": (add, "x-1", "x-1"),
          "add-2": (add, "add-1", "add-1"),
          "add-3": (add, "add-2", "add-2"),
          "add-4": (add, "add-3", "add-3"),
          "add-5": (add, "add-4", "add-4"),
      }
  
      res = fuse(dsk, "add-5", fuse_subgraphs=True)
      sol = with_deps(
          {
              "add-x-1": (
                  SubgraphCallable(
                      {
                          "x-1": 1,
                          "add-1": (add, "x-1", "x-1"),
                          "add-2": (add, "add-1", "add-1"),
                          "add-3": (add, "add-2", "add-2"),
                          "add-4": (add, "add-3", "add-3"),
                          "add-5": (add, "add-4", "add-4"),
                      },
                      "add-5",
                      (),
                  ),
              ),
              "add-5": "add-x-1",
          }
      )
      assert res == sol
  
imports: import itertools
  import pickle
  from functools import partial
  import pytest
  from flash.core.serve.dag.optimization import SubgraphCallable, cull, functions_of, fuse, fuse_linear, inline, inline_functions
  from flash.core.serve.dag.task import get, get_dependencies
  from flash.core.serve.dag.utils import apply, partial_by_order
  from flash.core.serve.dag.utils_test import add, inc
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 23 for calling a global function with example usage: test_fuse_subgraphs_linear_chains_of_duplicate_deps() without return types