code: def sigs_from_dir(
      directory, outfile, manual_wrappers=None, exclusions=None
  ):
      if directory[-1] in ["/", "\\"]:
          directory = directory[:-1]
      files = sorted(glob.glob(directory + "/*.f*"))
      if exclusions is None:
          exclusions = []
      if manual_wrappers is not None:
          exclusions += [
              get_sig_name(l) for l in manual_wrappers.split("\n")
          ]
      signatures = []
      for filename in files:
          name = os.path.splitext(os.path.basename(filename))[0]
          if name in exclusions:
              continue
          signatures.append(make_signature(filename))
      if manual_wrappers is not None:
          signatures += [l + "\n" for l in manual_wrappers.split("\n")]
      signatures.sort(key=get_sig_name)
      comment = [
          "# This file was generated by _cython_signature_generator.py.\n",
          "# Do not edit this file directly.\n\n",
      ]
      with open(outfile, "w") as f:
          f.writelines(comment)
          f.writelines(signatures)
  
imports: import glob
  import os
  from numpy.f2py import crackfortran
label_desc: Use image node_id 4 for calling a global function with example usage: sigs_from_dir(directory, outfile, manual_wrappers, exclusions) without return types