def get_options_and_groups(self):
        options = []
        option_groups = []

        for i in self.cmd_class.option_list:
            if isinstance(i, Option):
                options.append(i)
            elif isinstance(i, OptionGroup):
                option_groups.append(i)
            else:
                raise ValueError('Invalid item %r found in %r option list'
                                 % (i, self.cmd_class))

        return options, option_groups
dataset/ETHPy150Open reviewboard/rbtools/docs/rbtools/_ext/rbt_commands.py/CommandOptionsDirective.get_options_and_groups/original