code: def test_lgb_autolog_log_models_configuration(bst_params, log_models):
      iris = datasets.load_iris()
      X = pd.DataFrame(iris.data[:, :2], columns=iris.feature_names[:2])
      y = iris.target
  
      with mlflow.start_run() as run:
          mlflow.lightgbm.autolog(log_models=log_models)
          dataset = lgb.Dataset(X, y)
          lgb.train(bst_params, dataset)
  
      run_id = run.info.run_id
      client = MlflowClient()
      artifacts = [f.path for f in client.list_artifacts(run_id)]
      assert ("model" in artifacts) == log_models
  
imports: import functools
  import json
  import os
  import pickle
  from unittest import mock
  from unittest.mock import patch
  import lightgbm
  import matplotlib
  import numpy
  import pandas
  import pytest
  import yaml
  from packaging.version import Version
  from sklearn import datasets
  import mlflow
  import mlflow.lightgbm
  from mlflow import MlflowClient
  from mlflow.lightgbm import _autolog_callback
  from mlflow.models import Model
  from mlflow.models.utils import _read_example
  from mlflow.types.utils import _infer_schema
  from mlflow.utils.autologging_utils import BatchMetricsLogger, picklable_exception_safe_function
label_desc: Use image node_id 29 for calling a global function with example usage: test_lgb_autolog_log_models_configuration(bst_params, log_models) without return types