code: def test_rebuild(lin):
      linr = Linearizer(lin.ast)
      for o in lin.applied_opts:
          assert o in actions, f"{o} is not in actions"
          tactions.add(o)
          linr.apply_opt(o)
  
      assert len(lin.sts) == len(linr.sts)
      for st1, st2 in zip(lin.sts, linr.sts):
          assert st1 == st2, f"{st1} != {st2}"
  
imports: import random
  from tqdm import tqdm
  from extra.optimization.helpers import load_worlds, ast_str_to_lin
  from tinygrad.features.search import actions
  from tinygrad.codegen.linearizer import Linearizer
label_desc: Use image node_id 1 for calling a global function with example usage: test_rebuild(lin) without return types