code: def test_validate_batch_log_data():
      metrics_with_bad_key = [
          Metric("good-metric-key", 1.0, 0, 0),
          Metric("super-long-bad-key" * 1000, 4.0, 0, 0),
      ]
      metrics_with_bad_val = [
          Metric("good-metric-key", "not-a-double-val", 0, 0)
      ]
      metrics_with_bool_val = [Metric("good-metric-key", True, 0, 0)]
      metrics_with_bad_ts = [
          Metric("good-metric-key", 1.0, "not-a-timestamp", 0)
      ]
      metrics_with_neg_ts = [Metric("good-metric-key", 1.0, -123, 0)]
      metrics_with_bad_step = [
          Metric("good-metric-key", 1.0, 0, "not-a-step")
      ]
      params_with_bad_key = [
          Param("good-param-key", "hi"),
          Param("super-long-bad-key" * 1000, "but-good-val"),
      ]
      params_with_bad_val = [
          Param("good-param-key", "hi"),
          Param("another-good-key", "but-bad-val" * 1000),
      ]
      tags_with_bad_key = [
          RunTag("good-tag-key", "hi"),
          RunTag("super-long-bad-key" * 1000, "but-good-val"),
      ]
      tags_with_bad_val = [
          RunTag("good-tag-key", "hi"),
          RunTag("another-good-key", "but-bad-val" * 1000),
      ]
      bad_kwargs = {
          "metrics": [
              metrics_with_bad_key,
              metrics_with_bad_val,
              metrics_with_bool_val,
              metrics_with_bad_ts,
              metrics_with_neg_ts,
              metrics_with_bad_step,
          ],
          "params": [params_with_bad_key, params_with_bad_val],
          "tags": [tags_with_bad_key, tags_with_bad_val],
      }
      good_kwargs = {"metrics": [], "params": [], "tags": []}
      for arg_name, arg_values in bad_kwargs.items():
          for arg_value in arg_values:
              final_kwargs = copy.deepcopy(good_kwargs)
              final_kwargs[arg_name] = arg_value
              with pytest.raises(MlflowException, match=r".+"):
                  _validate_batch_log_data(**final_kwargs)
      # Test that we don't reject entities within the limit
      _validate_batch_log_data(
          metrics=[Metric("metric-key", 1.0, 0, 0)],
          params=[Param("param-key", "param-val")],
          tags=[RunTag("tag-key", "tag-val")],
      )
  
imports: import copy
  import pytest
  from mlflow.entities import Metric, Param, RunTag
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE, ErrorCode
  from mlflow.utils.validation import _is_numeric, _validate_batch_log_data, _validate_batch_log_limits, _validate_db_type_string, _validate_experiment_artifact_location, _validate_experiment_name, _validate_metric_name, _validate_model_alias_name, _validate_param_name, _validate_run_id, _validate_tag_name, path_not_unique
label_desc: Use image node_id 14 for calling a global function with example usage: test_validate_batch_log_data() without return types