code: def __init__(self, device: MetalDevice, name: str, lib: bytes):
      self.device, self.name, self.lib = device, name, lib
      if DEBUG >= 6:
          with tempfile.NamedTemporaryFile(delete=True) as shader:
              shader.write(lib)
              shader.flush()
              os.system(
                  f"cd {pathlib.Path(__file__).parents[2]}/disassemblers/applegpu && python3 compiler_explorer.py {shader.name}"
              )
      data = libdispatch.dispatch_data_create(lib, len(lib), None, None)
      self.library = unwrap2(
          self.device.device.newLibraryWithData_error_(data, None)
      )
      self.fxn = self.library.newFunctionWithName_(name)
      self.pipeline_state = unwrap2(
          self.device.device.newComputePipelineStateWithFunction_error_(
              self.fxn, None
          )
      )
  
imports: from __future__ import annotations
  import os, subprocess, pathlib, ctypes, tempfile, functools
  import Metal, libdispatch
  from typing import List, Any, Tuple, Optional
  from tinygrad.codegen.kernel import LinearizerOptions
  from tinygrad.helpers import prod, getenv, DEBUG, unwrap2
  from tinygrad.device import Compiled, LRUAllocator
  from tinygrad.renderer.cstyle import MetalRenderer
label_desc: Use image node_id 1 to create a new MetalProgram object  with example: obj = MetalProgram(device, name, lib)