code: def helper_test_lin(lin: Linearizer, opts, failed_platforms):
      for opt in opts:
          try:
              lin.apply_opt(opt)
          except AssertionError:
              # it's considered fixed if we invalidated the opts
              assert Device.DEFAULT not in failed_platforms
      if Device.DEFAULT not in failed_platforms:
          assert run_linearizer(lin) == "PASS"
      else:
          assert run_linearizer(lin) != "PASS"
  
imports: import unittest
  from tinygrad.codegen.linearizer import Linearizer
  from tinygrad.features.search import Opt, OptOps
  from tinygrad import Device, dtypes
  from tinygrad.helpers import OSX, CI
  from test.external.fuzz_linearizer import run_linearizer
  from tinygrad.ops import LazyOp, BinaryOps, UnaryOps, ReduceOps, BufferOps, MemBuffer, ConstBuffer, get_lazyop_info
  from tinygrad.shape.shapetracker import ShapeTracker
  from tinygrad.shape.view import View
label_desc: Use image node_id 1 for calling a global function with example usage: helper_test_lin(lin, opts, failed_platforms) without return types