code: def extract_filenames(corpus_path, follow_links=False):
      if os.listdir(corpus_path) == []:
          raise ValueError("%s: path is empty" % corpus_path)
      walk = os.walk
      for root, dirs, filenames in walk(
          corpus_path, followlinks=follow_links
      ):
          for filename in filenames:
              try:
                  yield os.path.join(root, filename)
              except:
                  continue
  
imports: from subprocess import DEVNULL, PIPE, Popen
  from ..imports import *
label_desc: Use image node_id 7 for calling a global function with example usage: extract_filenames(corpus_path, follow_links) without return types