code: def _handle_scipy_ndarray(data):  # taken from pymatreader.utils
      if data.dtype == np.dtype("object") and not isinstance(
          data, MatlabFunction
      ):
          as_list = []
          for element in data:
              as_list.append(_check_for_scipy_mat_struct(element))
          data = as_list
      elif isinstance(data.dtype.names, tuple):
          data = _todict_from_np_struct(data)
          data = _check_for_scipy_mat_struct(data)
  
      if isinstance(data, np.ndarray):
          data = np.array(data)
  
      return data
  
imports: import numpy
  from scipy.io import loadmat
  from ...utils import _import_pymatreader_funcs
label_desc: Use image node_id 2 for calling a global function with example usage: _handle_scipy_ndarray(data) and returns: data