def METHOD_NAME(self, level, message, *children, **kwargs):
    self.messages.append((level, message, children, kwargs))
    return nodes.METHOD_NAME(message, level=level,
                                type=self.levels[level],
                                *children, **kwargs)