class_docstr: Class for automatic detection and parsing of API docs
  to Sphinx-parsable reST format
class_docstr_tok: ["Class","for","automatic","detection","and","parsing","of","API","docs","to","Sphinx-parsable","reST","format"]
docstr: Generate API reST files.
  
  Parameters
  ----------
  outdir : string
      Directory name in which to store files
      We create automatic filenames for each module
  
  Returns
  -------
  None
  
  Notes
  -----
  Sets self.written_modules to list of written modules
docstr_tok: ["Generate","API","reST","files",".","Parameters","--","--","--","--","--","outdir",":","string","Directory","name","in","which","to","store","files","We","create","automatic","filenames","for","each","module","Returns","--","--","--","-","None","Notes","--","--","-","Sets","self.written_modules","to","list","of","written","modules"]
code: def write_api_docs(self, outdir):
      """Generate API reST files.
  
      Parameters
      ----------
      outdir : string
          Directory name in which to store files
          We create automatic filenames for each module
  
      Returns
      -------
      None
  
      Notes
      -----
      Sets self.written_modules to list of written modules
      """
      if not os.path.exists(outdir):
          os.mkdir(outdir)
      # compose list of modules
      modules = self.discover_modules()
      self.write_modules_api(modules, outdir)
  
file_path: nipy/tools/apigen.py
imports: import os
  import re
label_desc: Use image node_id 13 for calling the ApiDocWriter obj's underlying member method code with example usage: obj.write_api_docs(outdir) without return types