code: def run(self):
          
          logger = getLogger(__name__)
  
          try:
              config_class_name = self.arguments[0]
          except IndexError:
              raise SphinxError(
                  '{} directive requires a Config class '
                  'name as an argument'.format(self.directive_name))
          logger.debug('%s using Config class %s', self.directive_name,
                       config_class_name)
  
          config_class = get_type(config_class_name)
  
          config_fields = get_task_config_fields(config_class)
  
          all_nodes = []
  
          for field_name, field in config_fields.items():
              field_id = format_configfield_id(
                  '.'.join((config_class.__module__,
                            config_class.__name__)),
                  field_name)
  
              try:
                  format_field_nodes = get_field_formatter(field)
              except ValueError:
                  logger.debug('Skipping unknown config field type, '
                               '{0!r}'.format(field))
                  continue
  
              all_nodes.append(
                  format_field_nodes(field_name, field, field_id, self.state,
                                     self.lineno)
              )
  
          # Fallback if no configuration items are present
          if len(all_nodes) == 0:
              message = 'No configuration fields.'
              return [nodes.paragraph(text=message)]
  
          return all_nodes
docs: Main entrypoint method.
  
          Returns
          -------
          new_nodes : `list`
              Nodes to add to the doctree.