code: def to_pandas_nodes(G):  # noqa: N803
      
      data = []
      for n, meta in G.nodes(data=True):
          d = dict()
          d["node"] = n
          d.update(meta)
          data.append(d)
      return pd.DataFrame(data)
docs: Convert nodes in the graph into a pandas DataFrame.