code: def configured_app(minimal_app_for_api):
      app = minimal_app_for_api
      create_user(
          app,  # type:ignore
          username="test",
          role_name="Test",
          permissions=[
              (
                  permissions.ACTION_CAN_READ,
                  permissions.RESOURCE_DAG_WARNING,
              ),
              (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG),
          ],  # type: ignore
      )
      create_user(app, username="test_no_permissions", role_name="TestNoPermissions")  # type: ignore
      create_user(
          app,  # type:ignore
          username="test_with_dag2_read",
          role_name="TestWithDag2Read",
          permissions=[
              (
                  permissions.ACTION_CAN_READ,
                  permissions.RESOURCE_DAG_WARNING,
              ),
              (
                  permissions.ACTION_CAN_READ,
                  f"{permissions.RESOURCE_DAG_PREFIX}dag2",
              ),
          ],  # type: ignore
      )
  
      yield minimal_app_for_api
  
      delete_user(app, username="test")  # type: ignore
      delete_user(app, username="test_no_permissions")  # type: ignore
      delete_user(app, username="test_with_dag2_read")
  
imports: from __future__ import annotations
  from unittest.mock import ANY
  import pytest
  from airflow.models.dag import DagModel
  from airflow.models.dagwarning import DagWarning
  from airflow.security import permissions
  from airflow.utils.session import create_session
  from tests.test_utils.api_connexion_utils import assert_401, create_user, delete_user
  from tests.test_utils.db import clear_db_dag_warnings, clear_db_dags
label_desc: Use image node_id 1 for calling a global function with example usage: configured_app(minimal_app_for_api) without return types