<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_pandas_nodes(G):
 # noqa: N803 """ Convert nodes in the graph into a pandas DataFrame. """

    data = []
    for n, meta in G.nodes(data=True):
        d = dict()
        d["node"] = n
        d.update(meta)
        data.append(d)
    return pd.DataFrame(data)