code: def test_hashable_pydot(graph_type):
      # gh-5790
      G = graph_type()
      G.add_edge("5", frozenset([1]), t='"Example:A"', l=False)
      G.add_edge("1", 2, w=True, t=("node1",), l=frozenset(["node1"]))
      G.add_edge("node", (3, 3), w="string")
  
      assert [
          {"t": '"Example:A"', "l": "False"},
          {"w": "True", "t": "('node1',)", "l": "frozenset({'node1'})"},
          {"w": "string"},
      ] == [
          attr
          for _, _, attr in nx.nx_pydot.from_pydot(
              nx.nx_pydot.to_pydot(G)
          ).edges.data()
      ]
  
      assert {str(i) for i in G.nodes()} == set(
          nx.nx_pydot.from_pydot(nx.nx_pydot.to_pydot(G)).nodes
      )
  
file_path: networkx/networkx/drawing/tests/test_pydot.py
imports: from io import StringIO
  import pytest
  import networkx
  from networkx.utils import graphs_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_hashable_pydot(graph_type) without return types