code: def main(outdir):
      pwd = os.path.dirname(__file__)
      src_files = (
          os.path.abspath(__file__),
          os.path.abspath(os.path.join(pwd, "functions.json")),
          os.path.abspath(os.path.join(pwd, "_add_newdocs.py")),
      )
      dst_files = (
          "_ufuncs.pyx",
          "_ufuncs_defs.h",
          "_ufuncs_cxx.pyx",
          "_ufuncs_cxx.pxd",
          "_ufuncs_cxx_defs.h",
          "_ufuncs.pyi",
          "cython_special.pyx",
          "cython_special.pxd",
      )
      dst_files = (os.path.join(outdir, f) for f in dst_files)
  
      os.chdir(BASE_DIR)
  
      if all_newer(src_files, dst_files):
          print("scipy/special/_generate_pyx.py: all files up-to-date")
          return
  
      ufuncs, fused_funcs = [], []
      with open("functions.json") as data:
          functions = json.load(data)
      for f, sig in functions.items():
          ufuncs.append(Ufunc(f, sig))
          fused_funcs.append(FusedFunc(f, sig))
      generate_ufuncs(
          os.path.join(outdir, "_ufuncs"),
          os.path.join(outdir, "_ufuncs_cxx"),
          ufuncs,
      )
      generate_ufuncs_type_stubs(
          os.path.join(outdir, "_ufuncs"), ufuncs
      )
      generate_fused_funcs(
          os.path.join(outdir, "cython_special"),
          os.path.join(outdir, "_ufuncs"),
          fused_funcs,
      )
  
imports: import itertools
  import json
  import os
  from stat import ST_MTIME
  import argparse
  import re
  import textwrap
  import numpy
label_desc: Use image node_id 17 for calling a global function with example usage: main(outdir) without return types