code: def run(graph, program, address):
      threads = ThreadList(program)
      threads.add(Thread(0, address))
      arc = Arc()
      while threads:
          thread = threads.current()
          address = thread.address
          op = program[thread.pc]
          optype = type(op)
  
          if optype is Char:
              if address:
                  arc = graph.find_arc(address, op.c, arc)
                  if arc:
                      advance(thread, arc)
                      threads.add(thread)
          elif optype is Lit:
              if address:
                  c = op.c
                  arc = graph.find_path(c, arc, address)
                  if arc:
                      advance(thread, arc, c)
                      threads.add(thread)
          elif optype is Any:
              if address:
                  sofar = thread.sofar
                  pc = thread.pc + 1
                  for arc in graph.iter_arcs(address, arc):
                      t = Thread(
                          pc, arc.target, sofar + arc.label, arc.accept
                      )
                      threads.add(t)
          elif op is Match:
              if thread.accept:
                  yield thread.sofar
          else:
              raise Exception("Don't know what to do with %r" % op)
  
imports: from whoosh.automata.fst import Arc
label_desc: Use image node_id 8 for calling a global function with example usage: run(graph, program, address) without return types