class_docstr: Use to turn our docstrings into Markdown.
class_docstr_tok: ["Use","to","turn","our","docstrings","into","Markdown","."]
docstr: Replace sphinx style crossreferences with markdown links.
docstr_tok: ["Replace","sphinx","style","crossreferences","with","markdown","links","."]
code: def _transform_cross_references(self, line: str) -> str:
      """
      Replace sphinx style crossreferences with markdown links.
      """
      for match, ty, name in self.CROSS_REF_RE.findall(line):
          if name.startswith(f"{BASE_MODULE}."):
              path = name.split(".")
              if ty == "mod":
                  href = "/api/" + "/".join(path[1:])
              else:
                  href = (
                      "/api/"
                      + "/".join(path[1:-1])
                      + "/#"
                      + path[-1].lower()
                  )
              cross_ref = f"[`{path[-1]}`]({href})"
          elif "." not in name:
              cross_ref = f"[`{name}`](#{name.lower()})"
          else:
              cross_ref = f"`{name}`"
          line = line.replace(match, cross_ref)
      return line
  
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 4 for calling the AllenNlpDocstringProcessor obj's underlying member method code with example usage: obj._transform_cross_references(line) and returns: line