def check(match):
    for (name, value) in match.groupdict().items():
        if (value is not None):
            break
    else:
        raise RefineryCriticalException('Received empty match.')
    return self.labelled(value, kind=name)
def check(match):
    for (name, value) in match.groupdict().items():
        if (value is not None):
            break
    else:
        raise RefineryCriticalException('Received empty match.')
    return self.labelled(value, kind=name)