code: def visit_ClassDef(self, node) -> None:
      def is_an_exception_subclass(base_id: str) -> bool:
          return base_id == "Exception" or base_id.endswith(
              ("Warning", "Error")
          )
  
      exception_classes = []
  
      # Go through the class's bases and check if they are an Exception or Warning.
      for base in node.bases:
          base_id = getattr(base, "id", None)
          if base_id and is_an_exception_subclass(base_id):
              exception_classes.append(base_id)
  
      # The class subclassed an Exception or Warning so add it to the list.
      if exception_classes:
          self.found_exceptions.add(node.name)
  
file_path: pandas/scripts/validate_exception_location.py
imports: from __future__ import annotations
  import argparse
  import ast
  import pathlib
  import sys
  from typing import TYPE_CHECKING
label_desc: Use image node_id 2 for calling the Visitor obj's underlying member method code with example usage: obj.visit_ClassDef(node) and returns: unknown