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: Convert uri to absolute filepath.
  
  Parameters
  ----------
  uri : string
      URI of python module to return path for
  
  Returns
  -------
  path : None or string
      Returns None if there is no valid path for this URI
      Otherwise returns absolute file system path for URI
  
  Examples
  --------
  >>> docwriter = ApiDocWriter('sphinx')
  >>> import sphinx
  >>> modpath = sphinx.__path__[0]
  >>> res = docwriter._uri2path('sphinx.builder')
  >>> res == os.path.join(modpath, 'builder.py')
  True
  >>> res = docwriter._uri2path('sphinx')
  >>> res == os.path.join(modpath, '__init__.py')
  True
  >>> docwriter._uri2path('sphinx.does_not_exist')
docstr_tok: ["Convert","uri","to","absolute","filepath",".","Parameters","--","--","--","--","--","uri",":","string","URI","of","python","module","to","return","path","for","Returns","--","--","--","-","path",":","None","or","string","Returns","None","if","there","is","no","valid","path","for","this","URI","Otherwise","returns","absolute","file","system","path","for","URI","Examples","--","--","--","--",">",">",">","docwriter","=","ApiDocWriter","(","'sphinx","'",")",">",">",">","import","sphinx",">",">",">","modpath","=","sphinx.__path__","[","0","]",">",">",">","res","=","docwriter._uri2path","(","'sphinx.builder","'",")",">",">",">","res","==","os.path.join","(","modpath",",","'builder.py","'",")","True",">",">",">","res","=","docwriter._uri2path","(","'sphinx","'",")",">",">",">","res","==","os.path.join","(","modpath",",","'__init__.py","'",")","True",">",">",">","docwriter._uri2path","(","'sphinx.does_not_exist","'",")"]
code: def _uri2path(self, uri):
      """Convert uri to absolute filepath.
  
      Parameters
      ----------
      uri : string
          URI of python module to return path for
  
      Returns
      -------
      path : None or string
          Returns None if there is no valid path for this URI
          Otherwise returns absolute file system path for URI
  
      Examples
      --------
      >>> docwriter = ApiDocWriter('sphinx')
      >>> import sphinx
      >>> modpath = sphinx.__path__[0]
      >>> res = docwriter._uri2path('sphinx.builder')
      >>> res == os.path.join(modpath, 'builder.py')
      True
      >>> res = docwriter._uri2path('sphinx')
      >>> res == os.path.join(modpath, '__init__.py')
      True
      >>> docwriter._uri2path('sphinx.does_not_exist')
  
      """
      if uri == self.package_name:
          return os.path.join(self.root_path, "__init__.py")
      path = uri.replace(self.package_name + ".", "")
      path = path.replace(".", os.path.sep)
      path = os.path.join(self.root_path, path)
      # XXX maybe check for extensions as well?
      if os.path.exists(path + ".py"):  # file
          path += ".py"
      elif os.path.exists(os.path.join(path, "__init__.py")):
          path = os.path.join(path, "__init__.py")
      else:
          return None
      return path
  
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 6 for calling the ApiDocWriter obj's underlying member method code with example usage: obj._uri2path(uri) and returns: path, os, None