code: def test_add_role_edge_adds_role_as_expected(self):
      g = QueryGraph()
      g.add_vars("a")
      g.add_role_edge("a", "b", "role_label")
      edges = [edge for edge in g.edges]
      self.assertEqual(1, len(edges))
      self.assertDictEqual({"type": "role_label"}, g.edges["a", "b", 0])
  
file_path: typedb-ml/typedb_ml/networkx/query_graph_test.py
imports: import unittest
  from typedb_ml.networkx.query_graph import QueryGraph
label_desc: Use image node_id 4 for calling the TestQueryGraph obj's underlying member method code with example usage: obj.test_add_role_edge_adds_role_as_expected() without return types