code: def test_infer_signature_silently_fails(monkeypatch):
      monkeypatch.setenv("MLFLOW_TESTING", "false")
  
      class ErrorModel(BaseEstimator, ClassifierMixin):
          def fit(self, X, y=None):  # pylint: disable=unused-argument
              return self
  
          def predict(self, X):
              raise Exception("oh no!")
  
      with mlflow.start_run(), mock.patch(
          "mlflow.models.signature._logger.warning"
      ) as mock_warning:
          mlflow.sklearn.log_model(
              ErrorModel(),
              artifact_path="model",
              input_example=np.array([[1]]),
          )
          mock_warning.assert_called_once_with(
              AnyStringWith(
                  "Failed to infer the model signature from the input example."
              ),
              AnyStringWith("oh no!"),
          )
  
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 13 for calling a global function with example usage: test_infer_signature_silently_fails(monkeypatch) and returns: self