def _has_distortion(wcs):
 return any(((getattr(wcs, dist_attr) is not None) for dist_attr in [u'cpdis1', u'cpdis2', u'det2im1', u'det2im2', u'sip']))

def _has_distortion ( wcs ) : return any ( ( ( getattr ( wcs , dist_attr ) is not None ) for dist_attr in [ u'cpdis1' , u'cpdis2' , u'det2im1' , u'det2im2' , u'sip' ] ) )
true if contains any sip or image distortion components .