code: def _graph_is_connected(graph):
      """Return whether the graph is connected (True) or Not (False)
  
      Arguments
      ---------
      graph : array-like or sparse matrix, shape: (n_samples, n_samples)
          Adjacency matrix of the graph, non-zero weight means an edge between the nodes.
  
      Returns
      -------
      is_connected : bool
          True means the graph is fully connected and False means not.
      """
  
      if sparse.isspmatrix(graph):
          # sparse graph, find all the connected components
          n_connected_components, _ = connected_components(graph)
          return n_connected_components == 1
      else:
          # dense graph, find all connected components start from node 0
          return (
              _graph_connected_component(graph, 0).sum()
              == graph.shape[0]
          )
  
imports: import csv
  import numbers
  import warnings
  import scipy
  import pytest
  import numpy
  from scipy import sparse
  from scipy.sparse.linalg import eigsh
  from scipy.sparse.csgraph import connected_components
  from scipy.sparse.csgraph import laplacian
label_desc: Use image node_id 9 for calling a global function with example usage: _graph_is_connected(graph) and returns: unknown, unknown