code: def extract_tests_from_dir(directory):
      test_files = []
      for root, _, files in os.walk(directory):
          for file in files:
              if file.endswith(".py") and "helpers" not in root:
                  full_path = os.path.join(root, file)
                  test_files.extend(extract_tests_from_file(full_path))
  
      return test_files
  
imports: import os
  import random
  import ast
label_desc: Use image node_id 3 for calling a global function with example usage: extract_tests_from_dir(directory) and returns: test_files