code: def compile_metal_xcode(prg: str) -> bytes:
      # NOTE: if you run llvm-dis on "air" you can see the llvm bytecode
      air = subprocess.check_output(
          [
              "xcrun",
              "-sdk",
              "macosx",
              "metal",
              "-x",
              "metal",
              "-c",
              "-",
              "-o",
              "-",
          ],
          input=prg.encode("utf-8"),
      )
      return subprocess.check_output(
          ["xcrun", "-sdk", "macosx", "metallib", "-", "-o", "-"],
          input=air,
      )
  
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 for calling a global function with example usage: compile_metal_xcode(prg) and returns: subprocess