def METHOD_NAME(self, file_name, line_number, fmt, *args):
    if not self.ignore_warnings:
        sys.stderr.write(('{}:{}:Warning:' + fmt + '\n')
                         .format(file_name, line_number, *args))
        self.warnings += 1