code: def make_nxgraph_from_sparse_data(drow, dcol, weights):
      """Get igraph graph from row cols indexes and weights
      Code is adapted from scanpy utils"""
  
      g = nx.Graph()
      g.add_weighted_edges_from(list(zip(drow, dcol, weights)))
      return g
  
file_path: nptsne/demos/HSNELouvainDemo/testhsnelouvain.py
imports: from pathlib import Path
  import nptsne
  import numpy
  import community
  import networkx
  import matplotlib.pyplot
  import matplotlib
  from matplotlib.lines import Line2D
label_desc: Use image node_id 1 for calling a global function with example usage: make_nxgraph_from_sparse_data(drow, dcol, weights) and returns: g