code: def test_get_connectome():
      adj, coord = _make_connectome()
      connectome = html_connectome._get_connectome(adj, coord)
      con_x = decode(connectome["_con_x"], "<f4")
      expected_x = np.asarray(
          [
              0,
              0,
              0,
              0,
              20,
              0,
              10,
              10,
              0,
              10,
              30,
              0,
              20,
              0,
              0,
              20,
              20,
              0,
              20,
              40,
              0,
              30,
              10,
              0,
              30,
              30,
              0,
              40,
              20,
              0,
              40,
              40,
              0,
          ],
          dtype="<f4",
      )
      assert (con_x == expected_x).all()
      assert {"_con_x", "_con_y", "_con_z", "_con_w"}.issubset(
          connectome.keys()
      )
      assert (connectome["line_cmin"], connectome["line_cmax"]) == (
          -2.5,
          2.5,
      )
      adj[adj == 0] = np.nan
      connectome = html_connectome._get_connectome(adj, coord)
      con_x = decode(connectome["_con_x"], "<f4")
      assert (con_x == expected_x).all()
      assert (connectome["line_cmin"], connectome["line_cmax"]) == (
          -2.5,
          2.5,
      )
  
file_path: nilearn/nilearn/plotting/tests/test_html_connectome.py
imports: import json
  import numpy
  import pytest
  from nilearn.plotting import html_connectome
  from nilearn.plotting.js_plotting_utils import decode
  from .test_js_plotting_utils import check_html
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_connectome() without return types