code: def test_enforce_property():
      data = "some_sentence"
      prop = Property("a", DataType.string)
      assert _enforce_property(data, prop) == data
  
      data = ["some_sentence1", "some_sentence2"]
      prop = Property("a", Array(DataType.string))
      assert _enforce_property(data, prop) == data
  
      prop = Property("a", Array(DataType.binary))
      assert _enforce_property(data, prop) == data
  
      data = np.array([np.int32(1), np.int32(2)])
      prop = Property("a", Array(DataType.integer))
      assert (_enforce_property(data, prop) == data).all()
  
      data = {
          "a": "some_sentence",
          "b": b"some_bytes",
          "c": ["sentence1", "sentence2"],
          "d": {"str": "value", "arr": [0.1, 0.2]},
      }
      prop = Property(
          "any_name",
          Object(
              [
                  Property("a", DataType.string),
                  Property("b", DataType.binary, required=False),
                  Property("c", Array(DataType.string), required=False),
                  Property(
                      "d",
                      Object(
                          [
                              Property("str", DataType.string),
                              Property(
                                  "arr",
                                  Array(DataType.double),
                                  required=False,
                              ),
                          ]
                      ),
                  ),
              ]
          ),
      )
      assert _enforce_property(data, prop) == data
      data = {"a": "some_sentence", "d": {"str": "some_value"}}
      assert _enforce_property(data, prop) == data
  
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 12 for calling a global function with example usage: test_enforce_property() without return types