code: def __init__(
      self,
      cls,
      doc=None,
      modulename="",
      func_doc=FunctionDoc,
      config=None,
  ):
      if not inspect.isclass(cls) and cls is not None:
          raise ValueError("Expected a class or None, but got %r" % cls)
      self._cls = cls
  
      if modulename and not modulename.endswith("."):
          modulename += "."
      self._mod = modulename
  
      if doc is None:
          if cls is None:
              raise ValueError("No class or documentation string given")
          doc = pydoc.getdoc(cls)
  
      NumpyDocString.__init__(self, doc)
  
      if config is not None and config.get("show_class_members", True):
          if not self["Methods"]:
              self["Methods"] = [
                  (name, "", "") for name in sorted(self.methods)
              ]
          if not self["Attributes"]:
              self["Attributes"] = [
                  (name, "", "") for name in sorted(self.properties)
              ]
  
imports: import inspect
  import textwrap
  import re
  import pydoc
  from warnings import warn
label_desc: Use image node_id 1 to create a new ClassDoc object from inherited base classes: NumpyDocString with example: obj = ClassDoc(cls, doc, modulename, func_doc, config)