code: def register_warning_code(code, exception_type, domain='core'):
          
          Logger._warning_code_to_exception[code] = (exception_type, domain)
          Logger._domain_codes[domain].add(code)
docs: Register a new warning code