code: def test_log_cli_auto_enable(
      pytester: Pytester, cli_args: str
  ) -> None:
      """Check that live logs are enabled if --log-level or --log-cli-level is passed on the CLI.
      It should not be auto enabled if the same configs are set on the INI file.
      """
      pytester.makepyfile(
          """
          import logging
  
          def test_log_1():
              logging.info("log message from test_log_1 not to be shown")
              logging.warning("log message from test_log_1")
  
      """
      )
      pytester.makeini(
          """
          [pytest]
          log_level=INFO
          log_cli_level=INFO
      """
      )
  
      result = pytester.runpytest(cli_args)
      stdout = result.stdout.str()
      if cli_args == "--log-cli-level=WARNING":
          result.stdout.fnmatch_lines(
              [
                  "*::test_log_1 ",
                  "*-- live log call --*",
                  "*WARNING*log message from test_log_1*",
                  "PASSED *100%*",
                  "=* 1 passed in *=",
              ]
          )
          assert "INFO" not in stdout
      else:
          result.stdout.fnmatch_lines(
              ["*test_log_cli_auto_enable*100%*", "=* 1 passed in *="]
          )
          assert "INFO" not in stdout
          assert "WARNING" not in stdout
  
imports: import io
  import os
  import re
  from typing import cast
  import pytest
  from _pytest.capture import CaptureManager
  from _pytest.config import ExitCode
  from _pytest.fixtures import FixtureRequest
  from _pytest.pytester import Pytester
  from _pytest.terminal import TerminalReporter
label_desc: Use image node_id 15 for calling a global function with example usage: test_log_cli_auto_enable(pytester, cli_args) without return types