def METHOD_NAME() -> tuple[str, str] | None:
    return next(
        (
            (pattern, typename)
            for pattern, typename in type_patterns.items()
            if re.search(pattern, web.ctx.path)
        ),
        None,
    )