code: def _file_with_extension(directory, extension):
      matching = (
          f for f in os.listdir(directory) if f.endswith(extension)
      )
      (file,) = matching
      return file
  
imports: import io
  import os
  import sys
  import tokenize
  import shutil
  import contextlib
  import setuptools
  import distutils
  from setuptools.py31compat import TemporaryDirectory
  from pkg_resources import parse_requirements
  from pkg_resources.py31compat import makedirs
label_desc: Use image node_id 3 for calling a global function with example usage: _file_with_extension(directory, extension) and returns: file