code: def _process_wrap(
      rank: int, device: str, oob: _OOB, fn: Callable, args=()
  ):
      # setup the rank
      os.environ["RANK"] = str(rank)
  
      # setup out of band communication
      global OOB
      OOB = oob
  
      # do specific runtime initialization for distributed
      from tinygrad import Device
  
      device, device_num = Device.canonicalize(
          device
      ), 0 if ":" not in device else int(device.split(":")[-1])
      if "GPU" in device:
          from tinygrad.runtime.ops_gpu import CL
  
          CL.post_init(device_num)
      elif "HIP" in device:
          os.environ["HIP_DEFAULT_DEVICE"] = os.environ[
              "HIP_VISIBLE_DEVICES"
          ] = str(device_num)
      if DEBUG >= 1:
          print(
              f"distributed process {rank} initialized runtime for device {device}"
          )
  
      # convert device to be process specific
      Device.DEFAULT = (
          device.split(":")[0] if "GPU" in device else device
      )
  
      fn(*args)
  
file_path: tinygrad/extra/dist/__init__.py
imports: from multiprocessing.connection import Connection
  from typing import Any, Callable, List, Optional, Tuple
  from tinygrad.helpers import DEBUG, getenv
  import multiprocessing
  import os
label_desc: Use image node_id 3 for calling a global function with example usage: _process_wrap(rank, device, oob, fn, args) without return types