code: def compare_graphs(
      g, nodes: List[Dict[str, str]], edges: List[Dict[str, str]]
  ) -> None:
      assert (
          g._nodes.sort_values(by="n").to_dict(orient="records")
          == nodes
      )
      assert (
          g._edges.sort_values(by=["s", "d"]).to_dict(orient="records")
          == edges
      )
  
imports: from functools import lru_cache
  from typing import Dict, List
  import logging
  import pandas
  from common import NoAuthTestCase
  from graphistry.compute.ast import n, e_forward, e_reverse, e_undirected, is_in
  from graphistry.tests.test_compute import CGFull
  from graphistry.tests.test_compute_hops import hops_graph
  from graphistry.util import setup_logger
label_desc: Use image node_id 2 for calling a global function with example usage: compare_graphs(g, nodes, edges) without return types