code: def copy_docs_from(source_class, full_text=False):
      """
      Decorator to copy class and method docs from source to destin class.
      """
  
      def decorator(destin_class):
          # This works only in python 3.3+:
          # if not destin_class.__doc__:
          #     destin_class.__doc__ = source_class.__doc__
          for name in dir(destin_class):
              if name.startswith("_"):
                  continue
              destin_attr = getattr(destin_class, name)
              destin_attr = getattr(
                  destin_attr, "__func__", destin_attr
              )
              source_attr = getattr(source_class, name, None)
              source_doc = getattr(source_attr, "__doc__", None)
              if source_doc and not getattr(
                  destin_attr, "__doc__", None
              ):
                  if full_text or source_doc.startswith("See "):
                      destin_doc = source_doc
                  else:
                      destin_doc = "See :meth:`{}.{}.{}`".format(
                          source_class.__module__,
                          source_class.__name__,
                          name,
                      )
                  if isinstance(destin_attr, property):
                      # Set docs for object properties.
                      # Since __doc__ is read-only, we need to reset the property
                      # with the updated doc.
                      updated_property = property(
                          destin_attr.fget,
                          destin_attr.fset,
                          destin_attr.fdel,
                          destin_doc,
                      )
                      setattr(destin_class, name, updated_property)
                  else:
                      destin_attr.__doc__ = destin_doc
          return destin_class
  
      return decorator
  
imports: import copy
  import ctypes
  import functools
  import numbers
  import weakref
  from contextlib import contextmanager
  import torch
  import torch.distributions
  from torch import logsumexp
  from torch.distributions.utils import broadcast_all
  from pyro.util import ignore_jit_warnings
  from ..None import settings
label_desc: Use image node_id 1 for calling a global function with example usage: copy_docs_from(source_class, full_text) and returns: decorator, destin_class