def signal_number_to_name(signum):
 signal_to_name_map = dict(((k, v) for (v, k) in six.iteritems(signal.__dict__) if v.startswith(u'SIG')))
 return signal_to_name_map.get(signum, u'UNKNOWN')

def signal_number_to_name ( signum ) : signal_to_name_map = dict ( ( ( k , v ) for ( v , k ) in six . iteritems ( signal . __dict__ ) if v . startswith ( u'SIG' ) ) ) return signal_to_name_map . get ( signum , u'UNKNOWN' )
given an os signal number .