code: def test_object_construction_with_errors():
      with pytest.raises(
          MlflowException,
          match=r"Expected properties to be a list, got type dict",
      ):
          Object({"p1": Property("p1", DataType.string)})
  
      with pytest.raises(
          MlflowException,
          match=r"Creating Object with empty properties is not allowed.",
      ):
          Object([])
  
      properties = [
          Property("p1", DataType.string),
          Property("p2", DataType.binary),
          {"invalid_type": "value"},
      ]
      with pytest.raises(
          MlflowException,
          match=r"Expected values to be instance of Property",
      ):
          Object(properties)
  
      properties = [
          Property("p1", DataType.string),
          Property("p2", DataType.binary),
          Property("p2", DataType.boolean),
      ]
      with pytest.raises(
          MlflowException,
          match=r"Found duplicated property names: {'p2'}",
      ):
          Object(properties)
  
imports: import datetime
  import json
  import math
  import re
  import numpy
  import pandas
  import pyspark
  import pyspark.sql.types
  import pytest
  from scipy.sparse import csc_matrix, csr_matrix
  from mlflow.exceptions import MlflowException
  from mlflow.models.utils import _enforce_tensor_spec
  from mlflow.pyfunc import _parse_spark_datatype
  from mlflow.types import DataType
  from mlflow.types.schema import Array, ColSpec, Object, ParamSchema, ParamSpec, Property, Schema, TensorSpec
  from mlflow.types.utils import _get_tensor_shape, _infer_colspec_type, _infer_param_schema, _infer_schema, _validate_input_dictionary_contains_only_strings_and_lists_of_strings
label_desc: Use image node_id 34 for calling a global function with example usage: test_object_construction_with_errors() without return types