'parse_args(args : [string] = sys.argv[1:],
values : Values = None)
-> (values : Values, args : [string])
Parse the command-line options found in \'args\' (default:
sys.argv[1:]).  Any errors result in a call to \'error()\', which
by default prints the usage message to stderr and calls
sys.exit() with an error message.  On success returns a pair
(values, args) where \'values\' is an Values instance (with all
your option values) and \'args\' is the list of arguments left
over after parsing options.'

def parse_args(self, args=None, values=None):

    rargs = self._get_args(args)
    if (values is None):
        values = self.get_default_values()
    self.rargs = rargs
    self.largs = largs = []
    self.values = values
    try:
        stop = self._process_args(largs, rargs, values)
    except (BadOptionError, OptionValueError) as err:
        self.error(str(err))
    args = (largs + rargs)
    return self.check_values(values, args)
