code: def to_numpy(tensor):
      if isinstance(tensor, cp.ndarray):
          return cp.asnumpy(tensor)
      return tensor
  
file_path: tensorly/tensorly/backend/cupy_backend.py
imports: import warnings
  from .core import Backend, backend_types, backend_basic_math, backend_array
label_desc: Use image node_id 4 for calling the CupyBackend obj's underlying member method code with example usage: obj.to_numpy(tensor) and returns: tensor, cp