code: def _recv_rb(x: RawBuffer, target_rank: int):
      if RawHIPBuffer and isinstance(x, RawHIPBuffer):
          # open ipc handle
          handle, y_device = dist.OOB.recv(target_rank)
          check(hip.hipSetDevice(y_device))
          check(
              hip.hipIpcOpenMemHandle(
                  ctypes.byval(ptr := ctypes.c_void_p()), handle, 0
              )
          )
  
          # build a new buffer
          y = RawHIPBuffer(
              x.size,
              x.dtype,
              device=str(y_device),
              buf=ptr,
              allocator=None,
          )
          x._transfer(y)
  
          CacheCollector.add(__recv_rb, [x, target_rank, y], {})
      else:
          shm_name = dist.OOB.recv(target_rank)
          y = RawDiskBuffer(
              x.size, x.dtype, device="disk:shm:" + shm_name
          )
  
          # fast path when we can directly copyin
          if isinstance(x, RawBuffer):
              x._copyin(y.toCPU())
          else:
              x.fromCPU(y.toCPU())
  
          # jit support
          CacheCollector.add(__recv_rb, [x, target_rank, y], {})
      if DEBUG >= 2:
          print(
              f"****  rank {getenv('RANK')} got {x} from rank {target_rank}"
          )
  
imports: import ctypes
  from extra import dist
  from multiprocessing import shared_memory
  from tinygrad.helpers import DEBUG, colored, getenv
  from tinygrad.lazy import LazyBuffer
  from tinygrad.runtime.lib import RawBuffer, RawBufferCopyInOut
  from tinygrad.runtime.ops_disk import RawDiskBuffer
  from tinygrad.jit import CacheCollector
  from tinygrad.tensor import Tensor, Function
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: _recv_rb(x, target_rank) without return types