<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _build_parser(self):
 """Build the needed command-line parser."""

        parser = argparse.ArgumentParser()

        parser.add_argument('--pytree',
                            required=True,
                            type=self._valid_directory,
                            help='This is the path, absolute or relative, of the Python package '
                                 'that is to be parsed.')

        parser.add_argument('--doctree',
                            required=True,
                            type=self._valid_directory,
                            help='This is the path, absolute or relative, of the documentation '
                                 'package that is to be parsed.')

        parser.add_argument('--no-fail',
                            action='store_true',
                            help='Using this option will cause this program to return an exit '
                                 'code of 0 even when the given trees do not match.')

        parser.add_argument('--doc-ignores',
                            action=AddDocIgnores,
                            help='A comma separated list of additional doc files to ignore')

        return parser