class_docstr: Automatic detection and parsing of API docs to Sphinx-parsable reST format.
class_docstr_tok: ["Automatic","detection","and","parsing","of","API","docs","to","Sphinx-parsable","reST","format","."]
docstr: Set package_name
  
  >>> docwriter = ApiDocWriter('sphinx')
  >>> import sphinx
  >>> docwriter.root_path == sphinx.__path__[0]
  True
  >>> docwriter.package_name = 'docutils'
  >>> import docutils
  >>> docwriter.root_path == docutils.__path__[0]
  True
docstr_tok: ["Set","package_name",">",">",">","docwriter","=","ApiDocWriter","(","'sphinx","'",")",">",">",">","import","sphinx",">",">",">","docwriter.root_path","==","sphinx.__path__","[","0","]","True",">",">",">","docwriter.package_name","=","'docutils'",">",">",">","import","docutils",">",">",">","docwriter.root_path","==","docutils.__path__","[","0","]","True"]
code: def set_package_name(self, package_name):
      """Set package_name
  
      >>> docwriter = ApiDocWriter('sphinx')
      >>> import sphinx
      >>> docwriter.root_path == sphinx.__path__[0]
      True
      >>> docwriter.package_name = 'docutils'
      >>> import docutils
      >>> docwriter.root_path == docutils.__path__[0]
      True
      """
      # It's also possible to imagine caching the module parsing here
      self._package_name = package_name
      root_module = self._import(package_name)
      self.root_path = root_module.__path__[-1]
      self.written_modules = None
  
file_path: scikit-image/doc/tools/apigen.py
imports: import os
  import re
  from types import BuiltinFunctionType, FunctionType, ModuleType
label_desc: Use image node_id 3 for calling the ApiDocWriter obj's underlying member method code with example usage: obj.set_package_name(package_name) without return types