code: def document(cls: Type[T]) -> Type[T]:
      """
      Document a plotnine class
  
      To be used as a decorator
      """
      if cls.__doc__ is None:
          return cls
  
      baseclass_name = cls.mro()[-3].__name__
  
      try:
          return DOC_FUNCTIONS[baseclass_name](cls)
      except KeyError:
          return cls
  
file_path: plotnine/plotnine/doctools.py
imports: from __future__ import annotations
  import itertools
  import os
  import re
  import typing
  from functools import lru_cache
  from textwrap import dedent, indent
label_desc: Use image node_id 13 for calling a global function with example usage: document(cls) and returns: cls, DOC_FUNCTIONS, cls