def checkFormatVisitor(arg, dir_name, names):
    'Run checkFormat in parallel for the given files.\n\n  Args:\n    arg: a tuple (pool, result_list, owned_directories, error_messages)\n      pool and result_list are for starting tasks asynchronously.\n      owned_directories tracks directories listed in the CODEOWNERS file.\n      error_messages is a list of string format errors.\n    dir_name: the parent directory of the given files.\n    names: a list of file names.\n  '
    (pool, result_list, owned_directories, error_messags) = arg
    source_prefix = './source/'
    full_prefix = './source/extensions/'
    if (dir_name.startswith(full_prefix) and ('/' in dir_name[len(full_prefix):])):
        checkOwners(dir_name[len(source_prefix):], owned_directories, error_messages)
    for file_name in names:
        result = pool.apply_async(checkFormatReturnTraceOnError, args=(((dir_name + '/') + file_name),))
        result_list.append(result)
Run checkFormat in parallel for the given files.

Args:
  arg: a tuple (pool, result_list, owned_directories, error_messages)
    pool and result_list are for starting tasks asynchronously.
    owned_directories tracks directories listed in the CODEOWNERS file.
    error_messages is a list of string format errors.
  dir_name: the parent directory of the given files.
  names: a list of file names.
def checkFormatVisitor(arg, dir_name, names):
    'Run checkFormat in parallel for the given files.\n\n  Args:\n    arg: a tuple (pool, result_list, owned_directories, error_messages)\n      pool and result_list are for starting tasks asynchronously.\n      owned_directories tracks directories listed in the CODEOWNERS file.\n      error_messages is a list of string format errors.\n    dir_name: the parent directory of the given files.\n    names: a list of file names.\n  '
    (pool, result_list, owned_directories, error_messags) = arg
    source_prefix = './source/'
    full_prefix = './source/extensions/'
    if (dir_name.startswith(full_prefix) and ('/' in dir_name[len(full_prefix):])):
        checkOwners(dir_name[len(source_prefix):], owned_directories, error_messages)
    for file_name in names:
        result = pool.apply_async(checkFormatReturnTraceOnError, args=(((dir_name + '/') + file_name),))
        result_list.append(result)