code: def get_tensor_ptr(tensor):
      """Return the pointer to the underlying memory storage of a tensor."""
      if isinstance(tensor, numpy.ndarray):
          return tensor.ctypes.data
      if torch_available():
          if isinstance(tensor, torch.Tensor):
              if tensor.is_cuda:
                  raise RuntimeError(
                      "Torch tensor must be on CPU when using GLOO collectives."
                  )
              return tensor.data_ptr()
      raise ValueError(
          "Unsupported tensor type. Got: {}. Supported "
          "CPU tensor types are: torch.Tensor, "
          "numpy.ndarray.".format(type(tensor))
      )
  
imports: import asyncio
  import time
  from typing import List
  import numpy
  import ray
  import ray.experimental.internal_kv
  from ray._raylet import GcsClient
  from ray.util.collective.types import ReduceOp, torch_available
  from ray.util.queue import _QueueActor
label_desc: Use image node_id 5 for calling a global function with example usage: get_tensor_ptr(tensor) and returns: tensor, tensor