code: def restructuredtext(value, settings=RESTRUCTUREDTEXT_SETTINGS):
      
      try:
          from docutils.core import publish_parts
      except ImportError:
          warnings.warn("The Python docutils library isn't installed.",
                        RuntimeWarning)
          return value
  
      parts = publish_parts(source=force_bytes(value),
                            writer_name='html4css1',
                            settings_overrides=settings)
      return force_text(parts['fragment'])
docs: RestructuredText processing with optionnally custom settings.