code: def _parse_docstring(docstring):
      headers = []
      lines = docstring.splitlines()
      indentation = min(
          filter(
              lambda s: s > 0,
              map(lambda s: len(s) - len(s.lstrip()), lines),
          )
      )
      lines = list(
          (s[indentation:] if len(s) > len(s.lstrip()) else s)
          for s in lines
      )
      docstring = "\n".join(lines)
      labels = [
          "Args",
          "Arguments",
          "Variables",
          "Fields",
          "Yields",
          "Call arguments",
          "Raises",
          "Examples",
          "Example",
          "Usage",
          "Input shape",
          "Output shape",
          "Returns",
          "References",
      ]
      tag_re = re.compile(
          "(?<=\n)(" + "|".join(labels) + "):\n", re.MULTILINE
      )
      parts = tag_re.split(docstring)
      headers.append(("", parts.pop(0)))
      while len(parts) > 0:
          headers.append((parts.pop(0), parts.pop(0)))
      return headers
  
file_path: netron/tools/keras_metadata.py
imports: import json
  import os
  import pydoc
  import re
label_desc: Use image node_id 2 for calling a global function with example usage: _parse_docstring(docstring) and returns: headers