code: def _cast_to_numpy_ar(ar, **kwargs):
      if isinstance(ar, cp.ndarray):
          ar = ar.get()
      elif type(ar).__name__ == "Tensor":
          ar = ar.numpy()
      else:
          ar = np.asarray(ar)
      return ar
  
file_path: cugraph/python/cugraph/cugraph/gnn/feature_storage/feat_storage.py
imports: from __future__ import annotations
  from collections import defaultdict
  from typing import Sequence, Union
  import cudf
  import cupy
  import numpy
  import pandas
  from cugraph.utilities.utils import import_optional, MissingModule
label_desc: Use image node_id 3 for calling a global function with example usage: _cast_to_numpy_ar(ar) and returns: ar