def insert_option_group(self, idx, *args, **kwargs):
group = self.add_option_group(*args, **kwargs)<EOL>self.option_groups.pop()<EOL>self.option_groups.insert(idx, group)<EOL>return group<EOL>
Insert an OptionGroup at a given position.