code: def client_with_login(app, expected_response_code=302, **kwargs):
      patch_path = "airflow.providers.fab.auth_manager.security_manager.override.check_password_hash"
      with mock.patch(patch_path) as check_password_hash:
          check_password_hash.return_value = True
          client = app.test_client()
          resp = client.post("/login/", data=kwargs)
          assert resp.status_code == expected_response_code
      return client
  
file_path: airflow/tests/test_utils/www.py
imports: from __future__ import annotations
  import ast
  from unittest import mock
  from airflow.models import Log
label_desc: Use image node_id 1 for calling a global function with example usage: client_with_login(app, expected_response_code) and returns: client