code: def _send_rb(x: RawBuffer, target_rank: int):
      if RawHIPBuffer and x.__class__ is RawHIPBuffer:
          # send ipc handle
          check(hip.hipSetDevice(x._device))
          check(hip.hipDeviceSynchronize())
          check(
              hip.hipIpcGetMemHandle(
                  ctypes.byval(handle := hip.hipIpcMemHandle_t()),
                  x._buf,
              )
          )
          dist.OOB.send((handle, x._device), target_rank)
  
          # jit support
          x._allocator = (
              None  # need to disconnect allocator for sent buffers
          )
          CacheCollector.add(__send_rb, [x, target_rank, None], {})
      else:
          # create shared memory
          shm_name = (
              s := shared_memory.SharedMemory(
                  create=True, size=x.size * x.dtype.itemsize
              )
          ).name
          s.close()
  
          # copy the buffer into shared memory
          y = RawDiskBuffer(
              x.size, x.dtype, device="disk:shm:" + shm_name
          )
          # fast path when we can directly copyout
          if isinstance(x, RawBufferCopyInOut):
              x._copyout(np.frombuffer(y._buffer(), dtype=x.dtype.np))
          else:
              y.fromCPU(x.toCPU())
  
          dist.OOB.send(shm_name, target_rank)
  
          # jit support
          CacheCollector.add(__send_rb, [x, target_rank, y], {})
      if DEBUG >= 2:
          print(
              f"****  rank {getenv('RANK')} sent {x} to 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 3 for calling a global function with example usage: _send_rb(x, target_rank) without return types