code: def get_header(img):
      """Return header from nibabel image
  
      Parameters
      ----------
      img : ``SpatialImage`` instance
          Instance of nibabel ``SpatialImage`` class
  
      Returns
      -------
      header : object
          header object from `img`
      """
      try:
          return img.header
      except AttributeError:
          return img.get_header()
  
imports: import nibabel
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: get_header(img) and returns: img, img