def METHOD_NAME(self, parser, parent=None, depth=0):
    if depth >= len(self._headlines):
        return
    for group in parser.NESTED_ARGUMENT_GROUPS[parent]:
        is_parent = group in parser.NESTED_ARGUMENT_GROUPS
        # Exclude empty groups
        if not group._group_actions and not is_parent:
            continue
        title = group.title
        yield ""
        yield title
        yield self._headlines[depth] * len(title)
        yield from self.generate_group_rst(group)
        if is_parent:
            yield ""
            yield from self.METHOD_NAME(parser, group, depth + 1)