code: def visit_ClassDef(self, node):
      for dec in node.decorator_list:
          if "define_aliases" in ast.unparse(dec):
              parents = []
              if hasattr(node, "parent"):
                  parent = node.parent
                  while hasattr(parent, "parent") and not isinstance(
                      parent, ast.Module
                  ):
                      parents.insert(0, parent.name)
                      parent = parent.parent
              aliases = ast.literal_eval(dec.args[0])
              # Written as a regex rather than two lines to avoid unused entries
              # for setters on items with only a getter
              for substitutions in aliases.values():
                  parts = self.context + parents + [node.name]
                  self.output.write(
                      "\n".join(
                          f"{'.'.join(parts)}.[gs]et_{a}\n"
                          for a in substitutions
                      )
                  )
      for child in ast.iter_child_nodes(node):
          self.visit(child)
  
file_path: matplotlib/tools/stubtest.py
imports: import ast
  import os
  import pathlib
  import subprocess
  import sys
  import tempfile
label_desc: Use image node_id 3 for calling the Visitor obj's underlying member method code with example usage: obj.visit_ClassDef(node) without return types