code: def test_parse_tf_serving_raises_expected_errors():
      # input is bad if a column value is missing for a row/instance
      tfserving_instances = {
          "instances": [
              {"a": "s1", "b": 1},
              {"a": "s2", "b": 2, "c": [4, 5, 6]},
              {"a": "s3", "b": 3, "c": [7, 8, 9]},
          ]
      }
      with pytest.raises(
          MlflowException,
          match="The length of values for each input/column name are not the same",
      ):
          parse_tf_serving_input(tfserving_instances)
  
      # cannot specify both instance and inputs
      tfserving_input = {
          "instances": [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
          "inputs": {
              "a": ["s1", "s2", "s3"],
              "b": [1, 2, 3],
              "c": [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
          },
      }
      match = 'Invalid input. One of "instances" and "inputs" must be specified'
      with pytest.raises(MlflowException, match=match):
          parse_tf_serving_input(tfserving_input)
  
      # cannot specify signature name
      tfserving_input = {
          "signature_name": "hello",
          "inputs": {
              "a": ["s1", "s2", "s3"],
              "b": [1, 2, 3],
              "c": [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
          },
      }
      match = '"signature_name" parameter is currently not supported'
      with pytest.raises(MlflowException, match=match):
          parse_tf_serving_input(tfserving_input)
  
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 10 for calling a global function with example usage: test_parse_tf_serving_raises_expected_errors() without return types