code: def test_nested_array_object_to_and_from_dict():
      data = [
          {
              "p": "a",
              "arr": [
                  {"p2": True, "arr2": [1, 2, 3]},
                  {"arr2": [2, 3, 4]},
              ],
          }
      ]
      col_spec = _infer_colspec_type(data)
      arr = Array(
          Object(
              [
                  Property("p", DataType.string),
                  Property(
                      "arr",
                      Array(
                          Object(
                              [
                                  Property(
                                      "p2",
                                      DataType.boolean,
                                      required=False,
                                  ),
                                  Property(
                                      "arr2", Array(DataType.long)
                                  ),
                              ]
                          )
                      ),
                  ),
              ]
          )
      )
      assert col_spec == arr
      assert arr.to_dict() == {
          "type": "array",
          "items": {
              "type": "object",
              "properties": {
                  "p": {"type": "string", "required": True},
                  "arr": {
                      "type": "array",
                      "items": {
                          "type": "object",
                          "properties": {
                              "p2": {
                                  "type": "boolean",
                                  "required": False,
                              },
                              "arr2": {
                                  "type": "array",
                                  "items": {"type": "long"},
                                  "required": True,
                              },
                          },
                      },
                      "required": True,
                  },
              },
          },
      }
      assert (
          Array.from_json_dict(**json.loads(json.dumps(arr.to_dict())))
          == arr
      )
  
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 41 for calling a global function with example usage: test_nested_array_object_to_and_from_dict() without return types