code: def fixup(program):
      refs = {}
      i = 0
      while i < len(program):
          op = program[i]
          if isinstance(op, Label):
              refs[op] = i
              program.pop(i)
          else:
              i += 1
  
      if refs:
          for op in program:
              if isinstance(op, (Jmp, Split)):
                  op.x = refs[op.x]
              if isinstance(op, Split):
                  op.y = refs[op.y]
  
      return program + [Match]
  
imports: from whoosh.automata.fst import Arc
label_desc: Use image node_id 6 for calling a global function with example usage: fixup(program) and returns: unknown