def METHOD_NAME(self, *args, default=None):
    for thing in args:
        if thing is None:
            continue
        if isinstance(thing, TerminalNode):
            return thing.getText()
        return thing.value
    return default