code: def match(self, graph, node):
      all_matches = []
      for i, p in enumerate(self.patterns):
          matches, following = p.match(graph, node)
          if not matches:
              return [], None
          all_matches.extend(matches)
          if i < len(self.patterns) - 1:
              node = following  # Might be more than one node
      return all_matches, following
  
imports: import re
label_desc: Use image node_id 2 for calling the SerialPattern obj's underlying member method code with example usage: obj.match(graph, node) and returns: all_matches,  following, list,  None