code: def test_blueprint_with_subdomain():
      app = flask.Flask(__name__, subdomain_matching=True)
      app.config["SERVER_NAME"] = "example.com:1234"
      app.config["APPLICATION_ROOT"] = "/foo"
      client = app.test_client()
  
      bp = flask.Blueprint("company", __name__, subdomain="xxx")
  
      @bp.route("/")
      def index():
          return flask.request.url
  
      app.register_blueprint(bp)
  
      ctx = app.test_request_context("/", subdomain="xxx")
      assert ctx.request.url == "http://xxx.example.com:1234/foo/"
  
      with ctx:
          assert ctx.request.blueprint == bp.name
  
      rv = client.get("/", subdomain="xxx")
      assert rv.data == b"http://xxx.example.com:1234/foo/"
  
imports: import importlib.metadata
  import click
  import pytest
  import flask
  from flask import appcontext_popped
  from flask.cli import ScriptInfo
  from flask.globals import _cv_request
  from flask.json import jsonify
  from flask.testing import EnvironBuilder
  from flask.testing import FlaskCliRunner
label_desc: Use image node_id 9 for calling a global function with example usage: test_blueprint_with_subdomain() and returns: flask