code: def usedoc(other):
      '''
      Decorator which copies __doc__ of given object into decorated one.
  
      Usage:
  
      >>> def fnc1():
      ...     
      ...     pass
      >>> @usedoc(fnc1)
      ... def fnc2():
      ...     pass
      >>> fnc2.__doc__
      'docstring'collections.abc.D
  
      :param other: anything with a __doc__ attribute
      :type other: any
      :returns: decorator function
      :rtype: callable
      '''
      def inner(fnc):
          fnc.__doc__ = fnc.__doc__ or getattr(other, '__doc__')
          return fnc
      return inner
docs: Decorator which copies __doc__ of given object into decorated one.
  
      Usage:
  
      >>> def fnc1():
      ...     """docstring"""
      ...     pass
      >>> @usedoc(fnc1)
      ... def fnc2():
      ...     pass
      >>> fnc2.__doc__
      'docstring'collections.abc.D
  
      :param other: anything with a __doc__ attribute
      :type other: any
      :returns: decorator function
      :rtype: callable