code: def create_test_client(app, user_name, role_name, permissions):
      """
      Helper function to create a client with a temporary user which will be deleted once done
      """
      client = app.test_client()
      with create_user_scope(
          app,
          username=user_name,
          role_name=role_name,
          permissions=permissions,
      ) as _:
          resp = client.post(
              "/login/",
              data={"username": user_name, "password": user_name},
          )
          assert resp.status_code == 302
          yield client
  
file_path: airflow/tests/test_utils/api_connexion_utils.py
imports: from __future__ import annotations
  from contextlib import contextmanager
  from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP
  from airflow.providers.fab.auth_manager.security_manager.override import EXISTING_ROLES
label_desc: Use image node_id 1 for calling a global function with example usage: create_test_client(app, user_name, role_name, permissions) without return types