code: def test_route_decorator_custom_endpoint(app, client):
      bp = flask.Blueprint("bp", __name__)
  
      @bp.route("/foo")
      def foo():
          return flask.request.endpoint
  
      @bp.route("/bar", endpoint="bar")
      def foo_bar():
          return flask.request.endpoint
  
      @bp.route("/bar/123", endpoint="123")
      def foo_bar_foo():
          return flask.request.endpoint
  
      @bp.route("/bar/foo")
      def bar_foo():
          return flask.request.endpoint
  
      app.register_blueprint(bp, url_prefix="/py")
  
      @app.route("/")
      def index():
          return flask.request.endpoint
  
      assert client.get("/").data == b"index"
      assert client.get("/py/foo").data == b"bp.foo"
      assert client.get("/py/bar").data == b"bp.bar"
      assert client.get("/py/bar/123").data == b"bp.123"
      assert client.get("/py/bar/foo").data == b"bp.bar_foo"
  
imports: import pytest
  from jinja2 import TemplateNotFound
  from werkzeug.http import parse_cache_control_header
  import flask
label_desc: Use image node_id 14 for calling a global function with example usage: test_route_decorator_custom_endpoint(app, client) and returns: flask, flask, flask, flask, flask