code: def get_sparse_graph(self):
      return csr_matrix(
          (
              np.ones(len(self.edge_df)),
              (
                  self.edge_df.source_id.values,
                  self.edge_df.target_id.values,
              ),
          ),
          shape=(len(self.node_df), len(self.node_df)),
      )
  
file_path: scattertext/scattertext/graphs/SimpleDiGraph.py
imports: import numpy
  import pandas
  from scipy.sparse import csr_matrix
  from scipy.sparse.csgraph._traversal import connected_components
  from scattertext.graphs.ComponentDiGraph import ComponentDiGraph
label_desc: Use image node_id 5 for calling the SimpleDiGraph obj's underlying member method code with example usage: obj.get_sparse_graph() and returns: csr_matrix