'Checks cli input for flags.
Check for a flag, which accepts a fixed set of possible arguments, in
the command line; we will use this information to configure argparse\'s
help correctly.  Return the flag\'s argument, if it has one that matches
the sequence @possible_arguments; otherwise return whether the flag is
present.'

def prescan_for_flag(self, flag, possible_arguments):

    if (flag not in self.args):
        return False
    pos = self.args.index(flag)
    try:
        nxt = self.args[(pos + 1)]
        if (nxt in possible_arguments):
            return nxt
    except IndexError:
        pass
    return True
