code: def create_ar_from_tensor(t: torch.Tensor):
      t = convert_to_column_major(t)
      if t.device.type == "cuda":
          ar = cp.asarray(t)
      else:
          ar = t.numpy()
      return ar
  
file_path: cugraph/python/cugraph-dgl/cugraph_dgl/utils/cugraph_conversion_utils.py
imports: from __future__ import annotations
  from typing import Dict, Tuple, Union
  import cudf
  import pandas
  import dask.dataframe
  import dask_cudf
  from dask.distributed import get_client
  import cupy
  from cugraph.utilities.utils import import_optional
  from cugraph.gnn.dgl_extensions.dgl_uniform_sampler import src_n, dst_n
label_desc: Use image node_id 2 for calling a global function with example usage: create_ar_from_tensor(t) and returns: ar