def METHOD_NAME(*args, out=None):
    if not args or out is None:
        return
    token_regex, token, phantom, *_ = args
    res = msg = None
    for m in token_regex.finditer(out):
        *res, msg = m.group('path'), m.group('line'), m.group('msg')
        if res:
            break
    if res is None:
        log.info("Can't find token: %s", token)
    else:
        link = '{0}:{1}'.format(*res)
        log.debug('Found definition @ %s', link)
        phantom(msg.replace('\n', ' '), link)