code: def test_enforce_object():
      data = {
          "a": "some_sentence",
          "b": b"some_bytes",
          "c": ["sentence1", "sentence2"],
          "d": {"str": "value", "arr": [0.1, 0.2]},
      }
      obj = Object(
          [
              Property("a", DataType.string),
              Property("b", DataType.binary, required=False),
              Property("c", Array(DataType.string)),
              Property(
                  "d",
                  Object(
                      [
                          Property("str", DataType.string),
                          Property(
                              "arr",
                              Array(DataType.double),
                              required=False,
                          ),
                      ]
                  ),
              ),
          ]
      )
      assert _enforce_object(data, obj) == data
  
      data = {
          "a": "some_sentence",
          "c": ["sentence1", "sentence2"],
          "d": {"str": "some_value"},
      }
      assert _enforce_object(data, obj) == 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 10 for calling a global function with example usage: test_enforce_object() without return types