code: def find_pkg_dirs(package):
      close_matches = get_close_matches(
          package.lower(),
          os.environ["PATH"].lower().split(";"),
          cutoff=0,
      )
      dll_dir = None
      for close_match in close_matches:
          if os.path.exists(close_match) and glob(
              os.path.join(close_match, "*.dll")
          ):
              dll_dir = close_match
              break
      if dll_dir is None:
          raise Exception(
              f"Could not find required package: {package}. "
              "Add directory containing .dll files to system environment path."
          )
      dll_dir_split = dll_dir.replace("\\", "/").split("/")
      root = get_close_matches(
          package.lower(), dll_dir_split, cutoff=0
      )[0]
      root_dir = "/".join(
          dll_dir_split[: dll_dir_split.index(root) + 1]
      )
      return os.path.normpath(root_dir), os.path.normpath(dll_dir)
  
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 1 for calling a global function with example usage: find_pkg_dirs(package) and returns: os,  os