code: def test_directed_graph(self):
      g = hl.Graph()
      g.add_node("a")
      g.add_node("b")
      g.add_node("c")
      g.add_edge("a", "b")
      g.add_edge("b", "c")
  
      self.assertEqual(g.incoming("b")[0], "a")
      self.assertEqual(g.outgoing("b")[0], "c")
      g.replace(["b"], "x")
      self.assertEqual(
          sorted(list(g.nodes.values())), sorted(["a", "c", "x"])
      )
      self.assertEqual(g.incoming("x")[0], "a")
      self.assertEqual(g.outgoing("x")[0], "c")
  
imports: import unittest
  import hiddenlayer
  import hiddenlayer.ge
  import hiddenlayer.transforms
label_desc: Use image node_id 1 for calling the TestGraph obj's underlying member method code with example usage: obj.test_directed_graph() without return types