code: def get_connected_subgraph_df(self):
      return (
          pd.DataFrame(
              {
                  "component": self.get_connected_components(),
                  "nodes": self.node_df["index"].values,
                  "values": self.node_df.index,
              }
          )
          .groupby("component")
          .agg(list)
          .assign(size=lambda df: df.nodes.apply(len))
          .sort_values(by="size", ascending=False)
          .reset_index(drop=True)
      )
  
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 3 for calling the SimpleDiGraph obj's underlying member method code with example usage: obj.get_connected_subgraph_df() and returns: pd