parameters: (directory)
return_statement: return 'llvm' in include_listing
docstring: Arbitrary set of heuristics to determine if `directory` is an llvm dir.
  
      Errs on the side of false-positives.
docstring_summary: Arbitrary set of heuristics to determine if `directory` is an llvm dir.
docstring_tokens: Arbitrary set of heuristics to determine if directory is an llvm dir .
function: def _looks_like_llvm_dir(directory):
      """Arbitrary set of heuristics to determine if `directory` is an llvm dir.
  
      Errs on the side of false-positives."""
  
      contents = set(os.listdir(directory))
      expected_contents = [
          'CODE_OWNERS.TXT',
          'cmake',
          'docs',
          'include',
          'utils',
      ]
  
      if not all(c in contents for c in expected_contents):
          return False
  
      try:
          include_listing = os.listdir(os.path.join(directory, 'include'))
      except NotADirectoryError:
          return False
  
      return 'llvm' in include_listing
function_tokens: def _looks_like_llvm_dir ( directory ) : contents = set ( os . listdir ( directory ) ) expected_contents = [ 'CODE_OWNERS.TXT' , 'cmake' , 'docs' , 'include' , 'utils' , ] if not all ( c in contents for c in expected_contents ) : return False try : include_listing = os . listdir ( os . path . join ( directory , 'include' ) ) except NotADirectoryError : return False return 'llvm' in include_listing