code: def printInfo(data, header):
      # print image information
      print("\nInformations obtained from image header:")
      print("header type={}".format(type(header)))
      try:
          print("voxel spacing={}".format(get_pixel_spacing(header)))
      except AttributeError:
          print("Failed to retrieve voxel spacing.")
      try:
          print("offset={}".format(get_offset(header)))
      except AttributeError:
          print("Failed to retrieve offset.")
  
      print("\nInformations obtained from image array:")
      print(
          "datatype={},dimensions={},shape={}".format(
              data.dtype, data.ndim, data.shape
          )
      )
      print(
          "first and last element: {} / {}".format(
              data.flatten()[0], data.flatten()[-1]
          )
      )
  
file_path: medpy/bin/medpy_info.py
imports: import argparse
  import logging
  from medpy.io import load, get_pixel_spacing, get_offset
  from medpy.core import Logger
label_desc: Use image node_id 2 for calling a global function with example usage: printInfo(data, header) without return types