code: def test__to_cytoscape_json_collapse_outputs():
      data = _to_cytoscape_json(dsk, collapse_outputs=True)
      labels = list(map(lambda x: x["data"]["label"], data["nodes"]))
      assert len(labels) == 6  # 6 nodes total
      assert set(labels) == {"c", "d", "e", "f", ""}
      shapes = list(map(lambda x: x["data"]["shape"], data["nodes"]))
      assert set(shapes) == {"ellipse", "rectangle"}
  
imports: from __future__ import annotations
  import copy
  import os
  import re
  import sys
  from functools import partial
  from operator import add, neg
  import pytest
  from dask.dot import _to_cytoscape_json, cytoscape_graph
  from dask import delayed
  from dask.utils import ensure_not_exists
label_desc: Use image node_id 14 for calling a global function with example usage: test__to_cytoscape_json_collapse_outputs() without return types