code: def get_unscaled_data(img):
      """Get the data from a nibabel image, maybe without applying scaling
  
      Parameters
      ----------
      img : ``SpatialImage`` instance
          Instance of nibabel ``SpatialImage`` class
  
      Returns
      -------
      data : ndarray
          Data as loaded from image, not applying scaling if this can be avoided
      """
      if hasattr(nib.AnalyzeImage.ImageArrayProxy, "get_unscaled"):
          try:
              return img.dataobj.get_unscaled()
          except AttributeError:
              return np.array(img.dataobj)
      return nib.loadsave.read_img_data(img, prefer="unscaled")
  
imports: import nibabel
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: get_unscaled_data(img) and returns: nib, img, np