def METHOD_NAME(event, transaction_style, request):
    # type: (Event, str, Any) -> None
    name = ""
    if transaction_style == "url":
        name = request.route.rule or ""
    elif transaction_style == "endpoint":
        name = (
            request.route.name
            or transaction_from_function(request.route.callback)
            or ""
        )
    event["transaction"] = name
    event["transaction_info"] = {"source": SOURCE_FOR_STYLE[transaction_style]}