code: def run_linearizer(lin: Linearizer, rawbufs=None, var_vals=None):
      if rawbufs is None:
          rawbufs = bufs_from_lin(lin)
      if var_vals is None:
          var_vals = {v: v.min for v in lin.ast.vars()}
  
      # TODO: images needs required_optimization
      try:
          if isinstance(device, Compiled):
              prg = device.to_program(lin)
          else:
              prg = device.get_runner(lin.ast)
      except Exception:
          print(lin.ast)
          traceback.print_exc()
          print("COMPILE FAILED!!")
          return "COMPILE_ERROR"
  
      try:
          prg.exec(rawbufs, var_vals)
      except Exception:
          print(lin.ast)
          traceback.print_exc()
          print("EXEC FAILED!!")
          return "EXEC_ERROR"
  
      return "PASS"
  
file_path: tinygrad/test/external/fuzz_linearizer.py
imports: import random, traceback
  from typing import List, Tuple
  import numpy
  from collections import Counter
  from extra.optimization.helpers import load_worlds, ast_str_to_lin
  from tinygrad.codegen.linearizer import Linearizer
  from tinygrad.features.search import get_linearizer_actions, bufs_from_lin
  from tinygrad.graph import print_tree
  from tinygrad.helpers import getenv
  from tinygrad.device import Device, Compiled, Interpreted
  from tinygrad.codegen.linearizer import UOp
label_desc: Use image node_id 2 for calling a global function with example usage: run_linearizer(lin, rawbufs, var_vals) and returns: str, str, str