def has_nibabel(vox2ras_tkr=False):
 try:
  import nibabel
  out = True
  if vox2ras_tkr:
   out = (getattr(getattr(getattr(nibabel, 'MGHImage', 0), 'header_class', 0), 'get_vox2ras_tkr', None) is not None)
  return out
 except ImportError:
  return False

def has_nibabel ( vox2ras_tkr = False ) : try : import nibabel out = True if vox2ras_tkr : out = ( getattr ( getattr ( getattr ( nibabel , 'MGHImage' , 0 ) , 'header_class' , 0 ) , 'get_vox2ras_tkr' , None ) is not None ) return out except ImportError : return False
determine if nibabel is installed .