code: def inheritdoc(parent):
      
      def wrapper(func):
          # Assign the parent docstring to the child
          func.__doc__ = parent.__doc__
  
          @wraps(func)
          def caller(*args, **kwargs):
              return func(*args, **kwargs)
          return caller
      return wrapper
docs: Inherit documentation from a parent
  
      Parameters
      ----------
      parent : callable
          The parent function or class that contains the sought-after
          docstring. If it doesn't have a docstring, this might behave
          in unexpected ways.
          
      Examples
      --------
      >>> def a(x=1):
      ...     '''This is documentation'''
      ...     return x
      ...
      >>> @inheritdoc(a)
      ... def b(x):
      ...     return 2 * a(x)
      ...
      >>> print(b.__doc__)
      This is documentation
  
      >>> print(b(2))
      4