def run(self,<EOL>proc: Callable[[Optional[str], Optional[str], argparse.Namespace], Optional[bool]],<EOL>file_filter: Optional[Callable[[str], bool]]=None,<EOL>file_filter_2: Optional[Callable[[Optional[str], str, argparse.Namespace], bool]]=None)-> Tuple[int, int]:
nfiles = <NUM_LIT:0><EOL>nsuccess = <NUM_LIT:0><EOL>if self.opts.infile:<EOL><INDENT>for file_idx in range(len(self.opts.infile)):<EOL><INDENT>in_f = self.opts.infile[file_idx]<EOL>if self._check_filter(in_f, self.opts.indir, file_filter, file_filter_2):<EOL><INDENT>fn = os.path.join(self.opts.indir, in_f) if self.opts.indir else in_f<EOL>nfiles += <NUM_LIT:1><EOL>if self._call_proc(proc, fn, self._outfile_name('<STR_LIT>', fn, outfile_idx=file_idx)):<EOL><INDENT>nsuccess += <NUM_LIT:1><EOL><DEDENT>elif self.opts.stoponerror:<EOL><INDENT>return nfiles, nsuccess<EOL><DEDENT><DEDENT><DEDENT><DEDENT>elif not self.opts.indir:<EOL><INDENT>if self._check_filter(None, None, file_filter, file_filter_2):<EOL><INDENT>nfiles += <NUM_LIT:1><EOL>if self._call_proc(proc, None, self._outfile_name('<STR_LIT>', '<STR_LIT>')):<EOL><INDENT>nsuccess += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for dirpath, _, filenames in os.walk(self.opts.indir):<EOL><INDENT>for fn in filenames:<EOL><INDENT>if self._check_filter(fn, dirpath, file_filter, file_filter_2):<EOL><INDENT>nfiles += <NUM_LIT:1><EOL>if self._call_proc(proc, os.path.join(dirpath, fn), self._outfile_name(dirpath, fn)):<EOL><INDENT>nsuccess += <NUM_LIT:1><EOL><DEDENT>elif self.opts.stoponerror:<EOL><INDENT>return nfiles, nsuccess<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>return nfiles, nsuccess<EOL>
Run the directory list processor calling a function per file.
        :param proc: Process to invoke. Args: input_file_name, output_file_name, argparse options. Return pass or fail.
                     No return also means pass
        :param file_filter: Additional filter for testing file names, types, etc.
        :param file_filter_2: File filter that includes directory, filename and opts
                        (separate for backwards compatibility)
        :return: tuple - (number of files passed to proc: int, number of files that passed proc)