code: def test_cli_blueprints(app):
      """Test blueprint commands register correctly to the application"""
      custom = Blueprint("custom", __name__, cli_group="customized")
      nested = Blueprint("nested", __name__)
      merged = Blueprint("merged", __name__, cli_group=None)
      late = Blueprint("late", __name__)
  
      @custom.cli.command("custom")
      def custom_command():
          click.echo("custom_result")
  
      @nested.cli.command("nested")
      def nested_command():
          click.echo("nested_result")
  
      @merged.cli.command("merged")
      def merged_command():
          click.echo("merged_result")
  
      @late.cli.command("late")
      def late_command():
          click.echo("late_result")
  
      app.register_blueprint(custom)
      app.register_blueprint(nested)
      app.register_blueprint(merged)
      app.register_blueprint(late, cli_group="late_registration")
  
      app_runner = app.test_cli_runner()
  
      result = app_runner.invoke(args=["customized", "custom"])
      assert "custom_result" in result.output
  
      result = app_runner.invoke(args=["nested", "nested"])
      assert "nested_result" in result.output
  
      result = app_runner.invoke(args=["merged"])
      assert "merged_result" in result.output
  
      result = app_runner.invoke(args=["late_registration", "late"])
      assert "late_result" in result.output
  
imports: import importlib.metadata
  import os
  import platform
  import ssl
  import sys
  import types
  from functools import partial
  from pathlib import Path
  import click
  import pytest
  from _pytest.monkeypatch import notset
  from click.testing import CliRunner
  from flask import Blueprint
  from flask import current_app
  from flask import Flask
  from flask.cli import AppGroup
  from flask.cli import find_best_app
  from flask.cli import FlaskGroup
  from flask.cli import get_version
  from flask.cli import load_dotenv
  from flask.cli import locate_app
  from flask.cli import NoAppException
  from flask.cli import prepare_import
  from flask.cli import run_command
  from flask.cli import ScriptInfo
  from flask.cli import with_appcontext
label_desc: Use image node_id 28 for calling a global function with example usage: test_cli_blueprints(app) without return types