code: def _get_default_stream_for_array(array):
      if isinstance(array, list) and len(array):
          array = array[0]
      if _is_torch_tensor(array):
          import torch
  
          return _raw_cuda_stream(torch.cuda.current_stream())
      elif _is_cupy_array(array):
          import cupy
  
          return _raw_cuda_stream(cupy.cuda.get_current_stream())
      else:
          return None
  
imports: from enum import Enum, unique
  import re
  from nvidia.dali._backend_enums import DALIDataType, DALIImageType, DALIInterpType
  from nvidia.dali.backend_impl.types import *
label_desc: Use image node_id 14 for calling a global function with example usage: _get_default_stream_for_array(array) and returns: _raw_cuda_stream, _raw_cuda_stream, None