code: def register_to_doc(name: str):
      """Register the to_doc method for python AST node type.
  
      Parameters
      ----------
      name : str
          The type of python AST node.
  
      Returns
      -------
      f : Callable[[FnToDoc], None]
          The function of registering the to_doc method for python AST node type.
      """
  
      def f(to_doc: FnToDoc):  # pylint: disable=redefined-outer-name
          reg = Registry._inst  # pylint: disable=protected-access
          reg.table[name].to_doc = to_doc
  
      return f
  
imports: import ast
  import inspect
  import sys
  import typing
  from collections import defaultdict
  from .None import doc_core
  from .doc_core import *
label_desc: Use image node_id 1 for calling a global function with example usage: register_to_doc(name) and returns: f