code: def test_xgb_autolog_infers_model_signature_correctly(bst_params):
      mlflow.xgboost.autolog(log_model_signatures=True)
  
      # we cannot use dtrain fixture, as the dataset must be constructed
      #   after the call to autolog() in order to get the input example
      iris = datasets.load_iris()
      X = pd.DataFrame(iris.data[:, :2], columns=iris.feature_names[:2])
      y = iris.target
      dataset = xgb.DMatrix(X, y)
  
      xgb.train(bst_params, dataset)
      run = get_latest_run()
      run_id = run.info.run_id
      artifacts_dir = run.info.artifact_uri.replace("file://", "")
      client = MlflowClient()
      artifacts = [
          x.path for x in client.list_artifacts(run_id, "model")
      ]
  
      ml_model_filename = "MLmodel"
      assert str(os.path.join("model", ml_model_filename)) in artifacts
      ml_model_path = os.path.join(
          artifacts_dir, "model", ml_model_filename
      )
  
      data = None
      with open(ml_model_path) as f:
          data = yaml.load(f, Loader=yaml.FullLoader)
  
      assert data is not None
      assert "signature" in data
      signature = data["signature"]
      assert signature is not None
  
      assert "inputs" in signature
      assert json.loads(signature["inputs"]) == [
          {
              "name": "sepal length (cm)",
              "type": "double",
              "required": True,
          },
          {
              "name": "sepal width (cm)",
              "type": "double",
              "required": True,
          },
      ]
  
      assert "outputs" in signature
      assert json.loads(signature["outputs"]) == [
          {
              "type": "tensor",
              "tensor-spec": {"dtype": "float32", "shape": [-1, 3]},
          },
      ]
  
imports: import functools
  import json
  import os
  import pickle
  from unittest import mock
  import matplotlib
  import numpy
  import pandas
  import pytest
  import xgboost
  import yaml
  from packaging.version import Version
  from sklearn import datasets
  import mlflow
  import mlflow.xgboost
  from mlflow import MlflowClient
  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
  from mlflow.xgboost._autolog import IS_TRAINING_CALLBACK_SUPPORTED, autolog_callback
label_desc: Use image node_id 27 for calling a global function with example usage: test_xgb_autolog_infers_model_signature_correctly(bst_params) without return types