code: def get_tensor_strides(tensor):
      """Return the strides of the tensor as a list."""
      if isinstance(tensor, cupy.ndarray):
          return [
              int(stride / tensor.dtype.itemsize)
              for stride in tensor.strides
          ]
      if torch_available():
          if isinstance(tensor, torch.Tensor):
              return list(tensor.stride())
      raise ValueError(
          "Unsupported tensor type. Got: {}. Supported "
          "GPU tensor types are: torch.Tensor, "
          "cupy.ndarray.".format(type(tensor))
      )
  
file_path: ray/python/ray/util/collective/collective_group/nccl_util.py
imports: import numpy
  from ray.util.collective.types import ReduceOp, torch_available
label_desc: Use image node_id 12 for calling a global function with example usage: get_tensor_strides(tensor) and returns: unknown, list