code: def test_basics(self):
      g = hl.Graph()
      a = hl.Node(uid="a", name="a", op="a")
      b = hl.Node(uid="b", name="b", op="b")
      c = hl.Node(uid="c", name="c", op="c")
      d = hl.Node(uid="d", name="d", op="d")
      e = hl.Node(uid="e", name="e", op="e")
      g.add_node(a)
      g.add_node(b)
      g.add_node(c)
      g.add_node(d)
      g.add_node(e)
      g.add_edge(a, b)
      g.add_edge(b, c)
      g.add_edge(b, d)
      g.add_edge(c, e)
      g.add_edge(d, e)
  
      rule = ge.GEParser("a > b").parse()
      self.assertIsInstance(rule, ge.SerialPattern)
      match, following = rule.match(g, a)
      self.assertTrue(match)
      self.assertCountEqual(following, [c, d])
      match, following = rule.match(g, b)
      self.assertFalse(match)
  
      rule = ge.GEParser("b > c").parse()
      self.assertIsInstance(rule, ge.SerialPattern)
      match, following = rule.match(g, b)
      self.assertFalse(match)
  
      rule = ge.GEParser("c | d").parse()
      self.assertIsInstance(rule, ge.ParallelPattern)
      match, following = rule.match(g, [c, d])
      self.assertTrue(match)
      self.assertEqual(following, e)
      match, following = rule.match(g, [c])
      self.assertTrue(match)
      self.assertEqual(following, e)
      match, following = rule.match(g, d)
      self.assertTrue(match)
      self.assertEqual(following, e)
      match, following = rule.match(g, b)
      self.assertFalse(match)
  
      rule = ge.GEParser("a > b > (c | d)").parse()
      self.assertIsInstance(rule, ge.SerialPattern)
      match, following = rule.match(g, a)
      self.assertTrue(match, following)
  
      rule = ge.GEParser("(a > b) > (c | d)").parse()
      self.assertIsInstance(rule, ge.SerialPattern)
      match, following = rule.match(g, a)
      self.assertTrue(match)
  
      rule = ge.GEParser("a > b > (c | d) > e").parse()
      self.assertIsInstance(rule, ge.SerialPattern)
      match, following = rule.match(g, a)
      self.assertTrue(match)
  
      rule = ge.GEParser("(c | d) > e").parse()
      self.assertIsInstance(rule, ge.SerialPattern)
      match, following = rule.match(g, [c, d])
      self.assertTrue(match)
  
imports: import unittest
  import hiddenlayer
  import hiddenlayer.ge
  import hiddenlayer.transforms
label_desc: Use image node_id 1 for calling the TestPatterns obj's underlying member method code with example usage: obj.test_basics() without return types