code: def add_directive_header(self, sig):
          
          domain = getattr(self, 'domain', 'py')
          directive = getattr(self, 'directivetype', "module")
          name = self.format_name()
          self.add_line(u'.. %s:%s:: %s%s' % (domain, directive, name, sig),
                        '<autodoc>')
          if self.options.noindex:
              self.add_line(u'   :noindex:', '<autodoc>')
          if self.objpath:
              # Be explicit about the module, this is necessary since .. class::
              # etc. don't support a prepended module name
              self.add_line(u'   :module: %s' % self.modname, '<autodoc>')
docs: Add the directive header and options to the generated content.