code: def test_infer_signature_on_scalar_input_examples(input_example):
      class IdentitySklearnModel(BaseEstimator, ClassifierMixin):
          def fit(self, X, y=None):  # pylint: disable=unused-argument
              return self
  
          def predict(self, X):
              if isinstance(X, pd.DataFrame):
                  return X
              raise Exception("Unsupported input type")
  
      artifact_path = "model"
  
      with mlflow.start_run():
          mlflow.sklearn.log_model(
              IdentitySklearnModel(),
              artifact_path=artifact_path,
              input_example=input_example,
          )
          model_uri = mlflow.get_artifact_uri(artifact_path)
  
      mlflow_model = Model.load(model_uri)
      signature = mlflow_model.signature
      assert isinstance(signature, ModelSignature)
      assert signature.inputs.inputs[0].name == 0
      t = (
          DataType.string
          if isinstance(input_example, str)
          else DataType.binary
      )
      assert signature == ModelSignature(
          inputs=Schema([ColSpec(name=0, type=t)]),
          outputs=Schema([ColSpec(name=0, type=t)]),
      )
      # test that a single string still passes pyfunc schema enforcement
      mlflow.pyfunc.load_model(model_uri).predict(input_example)
  
imports: import json
  import math
  from unittest import mock
  import numpy
  import pandas
  import pytest
  import sklearn.neighbors
  from scipy.sparse import csc_matrix, csr_matrix
  from sklearn import datasets
  from sklearn.base import BaseEstimator, ClassifierMixin
  import mlflow
  from mlflow.models import Model
  from mlflow.models.signature import ModelSignature, infer_signature
  from mlflow.models.utils import _Example, _read_sparse_matrix_from_json, _read_tensor_input_from_json
  from mlflow.types import DataType
  from mlflow.types.schema import ColSpec, Schema, TensorSpec
  from mlflow.types.utils import TensorsNotSupportedException
  from mlflow.utils.file_utils import TempDir
  from mlflow.utils.proto_json_utils import dataframe_from_raw_json
  from tests.helper_functions import AnyStringWith
label_desc: Use image node_id 16 for calling a global function with example usage: test_infer_signature_on_scalar_input_examples(input_example) and returns: self, X