code: def check_dir(directory, newly_created_files):
    
    header_parse_failures = []
    for root, dirs, files in os.walk(directory):
      for f in files:
        if f.endswith('.py') and os.path.basename(f) != '__init__.py':
          filename = os.path.join(root, f)
          try:
            check_header(filename, filename in newly_created_files)
          except HeaderCheckFailure as e:
            header_parse_failures.append(e.message)
    return header_parse_failures
docs: Returns list of files that fail the check.