code: def append_docstring_attributes(docstring, locals):
      
      docstring = docstring or ''
      for attr, val in locals.items():
          doc = val.__doc__
          if not doc:
              continue
          doc = get_minimum_indent(doc) + doc
          lines = ['   ' + l for l in textwrap.dedent(doc).splitlines()]
          docstring = append_docstring(
              docstring,
              '',
              '.. attribute:: ' + attr,
              '',
              *lines
          )
      return docstring
docs: Manually appends class' ``docstring`` with its attribute docstrings.
      For example::
  
          class Entity(object):
              # ...
  
              __doc__ = append_docstring_attributes(
                  __doc__,
                  dict((k, v) for k, v in locals()
                              if isinstance(v, MyDescriptor))
              )
  
      :param docstring: class docstring to be appended
      :type docstring: :class:`str`
      :param locals: attributes dict
      :type locals: :class:`~typing.Mapping`\ [:class:`str`, :class:`object`]
      :returns: appended docstring
      :rtype: :class:`str`