code: def visit_ClassDef(self, node):
      bases = []
      for base in node.bases:
          name = ast.unparse(base)
          if name in self.tree:
              # We know this super class.
              bases.append(self.tree[name])
          elif len(names := name.split(".")) > 1:
              # Super class form is module.class:
              # look in module for class.
              *_, module, class_ = names
              if module in _modules:
                  bases.append(_modules[module].get(class_, name))
          else:
              bases.append(name)
  
      parent = self.stack[-1] if self.stack else None
      class_ = Class(
          self.module,
          node.name,
          bases,
          self.file,
          node.lineno,
          parent=parent,
          end_lineno=node.end_lineno,
      )
      if parent is None:
          self.tree[node.name] = class_
      self.stack.append(class_)
      self.generic_visit(node)
      self.stack.pop()
  
imports: import ast
  import sys
  import importlib.util
label_desc: Use image node_id 2 for calling the _ModuleBrowser obj's underlying member method code with example usage: obj.visit_ClassDef(node) without return types