code: def pkgconfig(package, kw):
      flag_map = {
          "-I": "include_dirs",
          "-L": "library_dirs",
          "-l": "libraries",
      }
      output = subprocess.getoutput(
          "pkg-config --cflags --libs {}".format(package)
      )
      if "not found" in output:
          raise RuntimeError(
              f"Could not find required package: {package}."
          )
      for token in output.strip().split():
          kw.setdefault(flag_map.get(token[:2]), []).append(token[2:])
      return kw
  
file_path: ffcv/setup.py
imports: from setuptools import find_packages
  import subprocess
  from difflib import get_close_matches
  from glob import glob
  import os
  import platform
  from distutils.core import setup, Extension
  from pathlib import Path
label_desc: Use image node_id 3 for calling a global function with example usage: pkgconfig(package, kw) and returns: kw