Return the OptionGroup to which the short or long option string opt_str (e.g. '-o' or '--option') belongs. If there’s no such OptionGroup, return None.
optparse/OptionParser.get_option_group
OptionParser.get_option_group