code: def docstring_to_markdown(docstring):
      """Convert a Python object's docstring to markdown
  
      Parameters
      ----------
      docstring : str
          The docstring body.
  
      Returns
      ----------
      clean_lst : list
          The markdown formatted docstring as lines (str) in a Python list.
  
      """
      new_docstring_lst = []
  
      encountered_examples = False
      for idx, line in enumerate(docstring.split("\n")):
          line = line.strip()
          if set(line) in ({"-"}, {"="}):
              new_docstring_lst[idx - 1] = (
                  "**%s**" % new_docstring_lst[idx - 1]
              )
          elif line.startswith(">>>"):
              if not encountered_examples:
                  new_docstring_lst.append("```")
                  encountered_examples = True
          new_docstring_lst.append(line)
  
      for idx, line in enumerate(new_docstring_lst[1:]):
          if line:
              if line.startswith("Description : "):
                  new_docstring_lst[idx + 1] = new_docstring_lst[
                      idx + 1
                  ].replace("Description : ", "")
              elif " : " in line:
                  line = line.replace(" : ", "` : ")
                  new_docstring_lst[idx + 1] = "\n- `%s\n" % line
              elif (
                  "**" in new_docstring_lst[idx - 1]
                  and "**" not in line
              ):
                  new_docstring_lst[idx + 1] = "\n%s" % line.lstrip()
              elif "**" not in line:
                  new_docstring_lst[idx + 1] = "    %s" % line.lstrip()
  
      clean_lst = []
      for line in new_docstring_lst:
          if set(line.strip()) not in ({"-"}, {"="}):
              clean_lst.append(line)
  
      if encountered_examples:
          clean_lst.append("```")
      return clean_lst
  
file_path: mlxtend/docs/make_api.py
imports: import inspect
  import os
  import pkgutil
  import shutil
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: docstring_to_markdown(docstring) and returns: clean_lst