code: def test_parse_tf_serving_arbitrary_input_dictionary():
      # input provided as a columnar dict with an arbitrary shape for each input, specifically a
      # different 0th dimension.
      tfserving_input_arbitrary = {
          "inputs": {
              "a": [["s1", "s2", "s3"], ["s4", "s5", "s6"]],  # [2, 3]
              "b": [1.1, 2.2, 3.3],  # [3,  ]
              "c": [
                  [1, 2, 3],
                  [4, 5, 6],
                  [7, 8, 9],
                  [10, 11, 12],
                  [13, 14, 15],
              ],  # [4, 3]
          }
      }
  
      schema = Schema(
          [
              TensorSpec(np.dtype("str"), [-1, 3], "a"),
              TensorSpec(np.dtype("float32"), [-1], "b"),
              TensorSpec(np.dtype("int32"), [-1, 4], "c"),
          ]
      )
      df_schema = Schema(
          [
              ColSpec("string", "a"),
              ColSpec("float", "b"),
              ColSpec("integer", "c"),
          ]
      )
  
      expected_result_no_schema_arbitrary = {
          "a": np.array([["s1", "s2", "s3"], ["s4", "s5", "s6"]]),
          "b": np.array([1.1, 2.2, 3.3]),
          "c": np.array(
              [
                  [1, 2, 3],
                  [4, 5, 6],
                  [7, 8, 9],
                  [10, 11, 12],
                  [13, 14, 15],
              ]
          ),
      }
      expected_result_schema_arbitrary = {
          "a": np.array(
              [["s1", "s2", "s3"], ["s4", "s5", "s6"]],
              dtype=np.dtype("str"),
          ),
          "b": np.array([1.1, 2.2, 3.3], dtype="float32"),
          "c": np.array(
              [
                  [1, 2, 3],
                  [4, 5, 6],
                  [7, 8, 9],
                  [10, 11, 12],
                  [13, 14, 15],
              ],
              dtype="int32",
          ),
      }
  
      # Without Schema
      result = parse_tf_serving_input(tfserving_input_arbitrary)
      assert_result(result, expected_result_no_schema_arbitrary)
  
      # With Schema
      result = parse_tf_serving_input(tfserving_input_arbitrary, schema)
      assert_result(result, expected_result_schema_arbitrary)
  
      # With df Schema
      result = parse_tf_serving_input(
          tfserving_input_arbitrary, df_schema
      )
      assert_result(result, expected_result_schema_arbitrary)
  
imports: import base64
  import datetime
  import json
  import numpy
  import pandas
  import pytest
  from google.protobuf.text_format import Parse
  from mlflow.entities import Experiment, Metric
  from mlflow.entities.model_registry import ModelVersion, RegisteredModel
  from mlflow.exceptions import MlflowException
  from mlflow.protos.model_registry_pb2 import RegisteredModel
  from mlflow.protos.service_pb2 import Experiment
  from mlflow.protos.service_pb2 import Metric
  from mlflow.types import ColSpec, DataType, Schema, TensorSpec
  from mlflow.types.schema import Array, Object, Property
  from mlflow.types.utils import _infer_schema
  from mlflow.utils.proto_json_utils import MlflowFailedTypeConversion, _CustomJsonEncoder, _stringify_all_experiment_ids, cast_df_types_according_to_schema, dataframe_from_parsed_json, dataframe_from_raw_json, message_to_json, parse_dict, parse_tf_serving_input
  from tests.protos.test_message_pb2 import TestMessage
label_desc: Use image node_id 8 for calling a global function with example usage: test_parse_tf_serving_arbitrary_input_dictionary() without return types