code: def document(*fns, inherit=False):
      """
      Defines the @document decorator which adds classes or functions to the Gradio
      documentation at www.gradio.app/docs.
  
      Usage examples:
      - Put @document() above a class to document the class and its constructor.
      - Put @document("fn1", "fn2") above a class to also document methods fn1 and fn2.
      - Put @document("*fn3") with an asterisk above a class to document the instance attribute methods f3.
      """
  
      def inner_doc(cls):
          functions = list(fns)
          if hasattr(cls, "EVENTS"):
              functions += cls.EVENTS
          global documentation_group
          if inherit:
              classes_inherit_documentation[cls] = None
          classes_to_document[documentation_group].append(
              (cls, functions)
          )
          return cls
  
      return inner_doc
  
file_path: gradio/client/python/gradio_client/documentation.py
imports: from __future__ import annotations
  import inspect
  from typing import Callable
label_desc: Use image node_id 3 for calling a global function with example usage: document() and returns: inner_doc, cls