'get (or create) a named option Group.
:name: name of the option group.
:description: long description for --help output.
:after: name of other group, used for ordering --help output.
The returned group object has an ``addoption`` method with the same
signature as :py:func:`parser.addoption
<_pytest.config.Parser.addoption>` but will be shown in the
respective group in the output of ``pytest. --help``.'

def getgroup(self, name, description='', after=None):

    for group in self._groups:
        if (group.name == name):
            return group
    group = OptionGroup(name, description, parser=self)
    i = 0
    for (i, grp) in enumerate(self._groups):
        if (grp.name == after):
            break
    self._groups.insert((i + 1), group)
    return group
