code: def extract(filename, node, prefix, output):
      num_extracted = 0
      if not (
          node.location.file is None
          or os.path.samefile(d(node.location.file.name), filename)
      ):
          return 0
      if node.kind in RECURSE_LIST:
          sub_prefix = prefix
          if node.kind != CursorKind.TRANSLATION_UNIT:
              if len(sub_prefix) > 0:
                  sub_prefix += "_"
              sub_prefix += d(node.spelling)
          for i in node.get_children():
              num_extracted += extract(filename, i, sub_prefix, output)
          if num_extracted == 0:
              return 0
      if node.kind in PRINT_LIST:
          comment = (
              d(node.raw_comment)
              if node.raw_comment is not None
              else ""
          )
          comment = process_comment(comment)
          sub_prefix = prefix
          if len(sub_prefix) > 0:
              sub_prefix += "_"
          if len(node.spelling) > 0:
              name = sanitize_name(sub_prefix + d(node.spelling))
              output.append(
                  '\nstatic const char *%s =%sR"doc(%s)doc";'
                  % (name, "\n" if "\n" in comment else " ", comment)
              )
              num_extracted += 1
      return num_extracted
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/deps/pybind11/tools/mkdoc.py
imports: import os
  import sys
  import platform
  import re
  import textwrap
  from clang import cindex
  from clang.cindex import CursorKind
  from collections import OrderedDict
  from threading import Thread, Semaphore
  from multiprocessing import cpu_count
label_desc: Use image node_id 4 for calling a global function with example usage: extract(filename, node, prefix, output) and returns: num_extracted, int, int