code: def _validate_string(input_data: str, content_type: str):
      try:
          if content_type == _CONTENT_TYPE_CSV:
              import pandas as pd
  
              pd.read_csv(StringIO(input_data))
          else:
              json.loads(input_data)
      except Exception as e:
          target = (
              "JSON"
              if content_type == _CONTENT_TYPE_JSON
              else "Pandas DataFrame"
          )
          raise MlflowException.invalid_parameter_value(
              message=f"Failed to deserialize input string data to {target}."
          ) from e
  
file_path: mlflow/mlflow/models/python_api.py
imports: import json
  import logging
  import os
  from datetime import datetime
  from io import StringIO
  from typing import ForwardRef, List, Optional, get_args, get_origin
  from mlflow.exceptions import MlflowException
  from mlflow.models.flavor_backend_registry import get_flavor_backend
  from mlflow.utils import env_manager
  from mlflow.utils.file_utils import TempDir
  from mlflow.utils.proto_json_utils import dump_input_data
label_desc: Use image node_id 6 for calling a global function with example usage: _validate_string(input_data, content_type) without return types