def ignore_message_warning():
 warnings.resetwarnings()
 warnings.filterwarnings('ignore', 'BaseException.message', DeprecationWarning)

def ignore_message_warning ( ) : warnings . resetwarnings ( ) warnings . filterwarnings ( 'ignore' , 'BaseException.message' , DeprecationWarning )
ignore the deprecationwarning for baseexception .