code: def find_dir(
      filename,
      env_vars=(),
      searchpath=(),
      file_names=None,
      url=None,
      verbose=False,
  ):
      return next(
          find_file_iter(
              filename,
              env_vars,
              searchpath,
              file_names,
              url,
              verbose,
              finding_dir=True,
          )
      )
  
imports: import fnmatch
  import locale
  import os
  import re
  import stat
  import subprocess
  import sys
  import textwrap
  import types
  import warnings
  from xml.etree import ElementTree
label_desc: Use image node_id 12 for calling a global function with example usage: find_dir(filename, env_vars, searchpath, file_names, url, verbose) and returns: next