def _filter_samples(sample_dirs, changed_files):
 result = []
 for sample_dir in sample_dirs:
  for changed_file in changed_files:
   if changed_file.startswith(sample_dir):
    result.append(sample_dir)
 return list(set(result))

def _filter_samples ( sample_dirs , changed_files ) : result = [ ] for sample_dir in sample_dirs : for changed_file in changed_files : if changed_file . startswith ( sample_dir ) : result . append ( sample_dir ) return list ( set ( result ) )
filers the list of sample directories to only include directories that contain files in the list of changed files .