class_docstr: Ignore certain files as they are completely un-importable. It patches:
  
  - find_autosummary_in_files: Some modules cannot be imported at all due to dependency issues or some special design.
    They need to skipped when running autosummary generate.
  - Autosummary.get_table: The original autosummary creates an index for each module, and the module links in autosummary table
    points to the corresponding generated module page (by using ``:py:module:xxx``). This doesn't work for us,
    because we have used automodule else (other than autosummary) in our docs, and to avoid duplicate index,
    we have to set ``:noindex:`` in autosummary template (see docs/templates/autosummary/module.rst).
    This breaks most of the links, where they fail to link to generated module page by using index.
    We here update the python domain role, to a general domain role (``:doc:``), and link to the page directly.
class_docstr_tok: ["Ignore","certain","files","as","they","are","completely","un-importable",".","It","patches",":","-","find_autosummary_in_files",":","Some","modules","can","not","be","imported","at","all","due","to","dependency","issues","or","some","special","design",".","They","need","to","skipped","when","running","autosummary","generate",".","-","Autosummary.get_table",":","The","original","autosummary","creates","an","index","for","each","module",",","and","the","module","links","in","autosummary","table","points","to","the","corresponding","generated","module","page","(","by","using","``",":","py",":","module",":","xxx","``",")",".","This","does","n't","work","for","us",",","because","we","have","used","automodule","else","(","other","than","autosummary",")","in","our","docs",",","and","to","avoid","duplicate","index",",","we","have","to","set","``",":","noindex",":","``","in","autosummary","template","(","see","docs\/templates\/autosummary\/module.rst",")",".","This","breaks","most","of","the","links",",","where","they","fail","to","link","to","generated","module","page","by","using","index",".","We","here","update","the","python","domain","role",",","to","a","general","domain","role","(","``",":","doc",":","``",")",",","and","link","to","the","page","directly","."]
code: def restore(self, *args, **kwargs):
      assert (
          self.find_autosummary_original is not None
          and self.get_table_original is not None
      )
      sphinx.ext.autosummary.generate.find_autosummary_in_files = (
          self.find_autosummary_original
      )
      sphinx.ext.autosummary.Autosummary.get_table = (
          self.get_table_original
      )
  
file_path: nni/docs/extension/patch_autodoc.py
imports: import inspect
  import os
  from typing import List, Tuple, List
  import sphinx
  from docutils import nodes
  from docutils.nodes import Node
label_desc: Use image node_id 1 for calling the AutoSummaryPatch obj's underlying member method code with example usage: obj.restore() without return types