code: def output_list_shap_values(X, dimensions, output_type):
      if output_type == "cupy":
          if dimensions == 1:
              return X[0]
          else:
              res = []
              for x in X:
                  res.append(x)
              return res
      else:
          if dimensions == 1:
              return cp.asnumpy(X[0])
          else:
              res = []
              for x in X:
                  res.append(cp.asnumpy(x))
              return res
  
file_path: cuml/python/cuml/explainer/common.py
imports: from cuml.internals.base import Base
  from cuml.internals.input_utils import input_to_cupy_array
  from pylibraft.common.handle import Handle
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 7 for calling a global function with example usage: output_list_shap_values(X, dimensions, output_type) and returns: X, res, cp, res