code: def warning(self_, msg,*args,**kw):
          
          if not warnings_as_exceptions:
              global warning_count
              warning_count+=1
              self_.__db_print(WARNING,msg,*args,**kw)
          else:
              raise Exception("Warning: " + msg % args)
docs: Print msg merged with args as a warning, unless module variable
          warnings_as_exceptions is True, then raise an Exception
          containing the arguments.
  
          See Python's logging module for details of message formatting.