code: def test_cli_create_user_supplied_password_is_masked(
      self, given_command, expected_masked_command, session
  ):
      # '-p' value which is not password, like 'airflow scheduler -p'
      # or 'airflow celery flower -p 8888', should not be masked
      args = given_command.split()
  
      expected_command = expected_masked_command.split()
  
      exec_date = timezone.utcnow()
      namespace = Namespace(
          dag_id="foo",
          task_id="bar",
          subcommand="test",
          execution_date=exec_date,
      )
      with mock.patch.object(sys, "argv", args), mock.patch(
          "airflow.utils.session.create_session"
      ) as mock_create_session:
          metrics = cli._build_metrics(args[1], namespace)
          # Make it so the default_action_log doesn't actually commit the txn, by giving it a nexted txn
          # instead
          mock_create_session.return_value = session.begin_nested()
          mock_create_session.return_value.bulk_insert_mappings = (
              session.bulk_insert_mappings
          )
          cli_action_loggers.default_action_log(**metrics)
  
          log = session.query(Log).order_by(Log.dttm.desc()).first()
  
      assert metrics.get("start_datetime") <= datetime.utcnow()
  
      command: str = json.loads(log.extra).get("full_command")
      # Replace single quotes to double quotes to avoid json decode error
      command = ast.literal_eval(command)
      assert command == expected_command
  
imports: from __future__ import annotations
  import ast
  import json
  import os
  import sys
  from argparse import Namespace
  from contextlib import contextmanager
  from datetime import datetime
  from pathlib import Path
  from unittest import mock
  import pytest
  import airflow
  from airflow import settings
  from airflow.exceptions import AirflowException
  from airflow.models.log import Log
  from airflow.utils import cli, cli_action_loggers, timezone
  from airflow.utils.cli import _search_for_dag_file, get_dag_by_pickle
label_desc: Use image node_id 6 for calling the TestCliUtil obj's underlying member method code with example usage: obj.test_cli_create_user_supplied_password_is_masked(given_command, expected_masked_command, session) without return types