def is_suppressed_warning(type, subtype, suppress_warnings):
 if (type is None):
  return False
 for warning_type in suppress_warnings:
  if ('.' in warning_type):
   (target, subtarget) = warning_type.split('.', 1)
  else:
   (target, subtarget) = (warning_type, None)
  if (target == type):
   if ((subtype is None) or (subtarget is None) or (subtarget == subtype) or (subtarget == '*')):
    return True
 return False

def is_suppressed_warning ( type , subtype , suppress_warnings ) : if ( type is None ) : return False for warning_type in suppress_warnings : if ( '.' in warning_type ) : ( target , subtarget ) = warning_type . split ( '.' , 1 ) else : ( target , subtarget ) = ( warning_type , None ) if ( target == type ) : if ( ( subtype is None ) or ( subtarget is None ) or ( subtarget == subtype ) or ( subtarget == '*' ) ) : return True return False
check the warning is suppressed or not .