code: def doc(
      title, underline_char=None, options=":maxdepth: 2", entries=[]
  ):
      """Main entry point for index.py file that replaces a standard index.rst file.
  
      The contents of this doc will be used to generate corresponding index.rst
  
      Parameters
      ----------
      title : str
          Either a title used within `..title::` directive or if underline_char is present,
          the underline_char will be used to do the sphinx header by placing
          it len(title) times under the title.
      underline_char : str, optional
          If provided, do not generate a `..title::` section but a header with specified underline
      options : str or list[str]
          List of options like `:maxdepth:` for the toctree.
      entries : list[str or doc_entry(...)]
          Toctree of subpages, can be either represented by regular strings or by
          `doc_entry()` that allows to put the reference from operator to given notebook.
  
          Entries come in three form:
            * a path to Python index file, for example: "operations/index.py" must lead to another
              file with `doc()` section to be processed recursively.
            * any other string representing path that doesn't end with `.py` - they will be inserted
              as is. No extension also supported with the same behaviour as regular Sphinx.
              Python processing stops here.
            * an doc_entry() - allows to provide optional reference.
  
      """
      global doc_return_value
      doc_return_value = Doc(title, underline_char, options, entries)
  
file_path: DALI/docs/doc_index.py
imports: from pathlib import Path
label_desc: Use image node_id 2 for calling a global function with example usage: doc(title, underline_char, options, entries) without return types