code: def py2md(module: str, out: Optional[str] = None) -> bool:
      """
      Returns `True` if module successfully processed, otherwise `False`.
      """
      logger.debug("Processing %s", module)
      pydocmd = PydocMarkdown(
          loaders=[PythonLoader(modules=[module])],
          processors=[
              AllenNlpFilterProcessor(),
              AllenNlpDocstringProcessor(),
          ],
          renderer=AllenNlpRenderer(
              filename=out,
              add_method_class_prefix=False,
              add_member_class_prefix=False,
              data_code_block=True,
              signature_with_def=True,
              signature_with_vertical_bar=True,
              use_fixed_header_levels=False,
              render_module_header=False,
              descriptive_class_title=False,
              classdef_with_decorators=True,
              classdef_render_init_signature_if_needed=True,
          ),
      )
      if out:
          out_path = Path(out)
          os.makedirs(out_path.parent, exist_ok=True)
  
      modules = pydocmd.load_modules()
      try:
          pydocmd.process(modules)
      except DocstringError as err:
          logger.exception("Failed to process %s.\n%s", module, err)
          return False
      pydocmd.render(modules)
      return True
  
imports: import argparse
  import logging
  import os
  import re
  import sys
  from collections import OrderedDict
  from dataclasses import dataclass
  from enum import Enum
  from multiprocessing import Pool, cpu_count
  from pathlib import Path
  from typing import List, Optional, Tuple
  import docspec
  from docspec import ApiObject, Class, Data, Function, Indirection, Module
  from docspec_python import format_arglist
  from pydoc_markdown import Processor, PydocMarkdown, Resolver
  from pydoc_markdown.contrib.loaders.python import PythonLoader
  from pydoc_markdown.contrib.renderers.markdown import MarkdownRenderer
label_desc: Use image node_id 2 for calling a global function with example usage: py2md(module, out) and returns: True, False