code: def test_parse_tf_serving_input_for_dictionaries_and_lists(
      data, schema, instances_data
  ):
      np.testing.assert_equal(
          parse_tf_serving_input({"inputs": data}, schema), data
      )
      if instances_data is None:
          np.testing.assert_equal(
              parse_tf_serving_input({"instances": data}, schema), data
          )
      else:
          np.testing.assert_equal(
              parse_tf_serving_input({"instances": data}, schema),
              instances_data,
          )
      df = (
          pd.DataFrame(data)
          if isinstance(data, list)
          else pd.DataFrame([data])
      )
      df_split = df.to_dict(orient="split")
      pd.testing.assert_frame_equal(
          dataframe_from_parsed_json(df_split, "split", schema), df
      )
      df_records = df.to_dict(orient="records")
      pd.testing.assert_frame_equal(
          dataframe_from_parsed_json(df_records, "records", schema), df
      )
  
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 15 for calling a global function with example usage: test_parse_tf_serving_input_for_dictionaries_and_lists(data, schema, instances_data) without return types