code: def delegates_doc(to=None, keep=False):
      "Decorator: replace `__doc__` with `__doc__` from `to`"
  
      def _f(f):
          from_f = f.__init__ if to is None else f
          if to is None:
              for base_cls in f.__bases__:
                  to_f = base_cls.__init__
          else:
              if isinstance(to, types.FunctionType):
                  to_f = to
              else:
                  to_f = to.__init__
          from_f.__doc__ = to_f.__doc__
          return f
  
      return _f
  
imports: import sys
  from abc import ABC
  import inspect
  import types
  from typing import Union, List, Tuple
  from pathlib import Path
  from importlib import import_module
  import socket
  import dash
  from dash import html, dcc, Input, Output, State
  from dash.exceptions import PreventUpdate
  import dash_bootstrap_components
  from .None import to_html
label_desc: Use image node_id 2 for calling a global function with example usage: delegates_doc(to, keep) and returns: _f, f