'gets the parsed args from a patched parser'

def get_parsed_args(self, comp_words):

    active_parsers = self._patch_argument_parser()
    parsed_args = argparse.Namespace()
    self.completing = True
    if USING_PYTHON2:
        comp_words = [ensure_bytes(word) for word in comp_words]
    try:
        active_parsers[0].parse_known_args(comp_words, namespace=parsed_args)
    except BaseException:
        pass
    self.completing = False
    return parsed_args
