code: def test_enforce_datatype_with_errors():
      with pytest.raises(
          MlflowException,
          match=r"Expected dtype to be DataType, got str",
      ):
          _enforce_datatype("string", "string")
  
      with pytest.raises(
          MlflowException,
          match=r"Failed to enforce schema of data `123` with dtype `string`",
      ):
          _enforce_datatype(123, DataType.string)
  
imports: import random
  from collections import namedtuple
  from unittest import mock
  import numpy
  import pytest
  import sklearn.neighbors
  from sklearn import datasets
  import mlflow
  from mlflow import MlflowClient
  from mlflow.entities.model_registry import ModelVersion
  from mlflow.exceptions import MlflowException
  from mlflow.models import add_libraries_to_model
  from mlflow.models.utils import _enforce_array, _enforce_datatype, _enforce_object, _enforce_property, get_model_version_from_model_uri
  from mlflow.types import DataType
  from mlflow.types.schema import Array, Object, Property
label_desc: Use image node_id 9 for calling a global function with example usage: test_enforce_datatype_with_errors() without return types