code: def _gifti_img_to_data(gifti_img):
      """Load surface image e.g. sulcal depth or statistical map \
          in nibabel.gifti.GiftiImage to data.
  
      Used by load_surf_data function in common to surface sulcal data
      acceptable to .gii or .gii.gz
  
      """
      if not gifti_img.darrays:
          raise ValueError("Gifti must contain at least one data array")
  
      if len(gifti_img.darrays) == 1:
          return np.asarray([gifti_img.darrays[0].data]).T.squeeze()
  
      return np.asarray(
          [arr.data for arr in gifti_img.darrays], dtype=object
      ).T.squeeze()
  
imports: import gzip
  import os
  import warnings
  from collections import namedtuple
  from collections.abc import Mapping
  import nibabel
  import numpy
  import sklearn.cluster
  import sklearn.preprocessing
  from nibabel import freesurfer, gifti
  from scipy import interpolate, sparse
  from nilearn import _utils, datasets
  from nilearn._utils import stringify_path
  from nilearn._utils.path_finding import resolve_globbing
  from nilearn.image import get_data, load_img, resampling
label_desc: Use image node_id 17 for calling a global function with example usage: _gifti_img_to_data(gifti_img) and returns: np, np