code: def test_generate_pydantic_schema_for_metadata_errors(
      metadata_properties: List["AllowedMetadataPropertyTypes"],
      validation_data: Dict[str, Union[str, int, float]],
      exception_cls: Exception,
      exception_msg: str,
  ) -> None:
      MetadataSchema = generate_pydantic_schema_for_metadata(
          metadata_properties=metadata_properties, name="MetadataSchema"
      )
      with pytest.raises(exception_cls, match=exception_msg):
          MetadataSchema(**validation_data)
  
file_path: argilla/tests/unit/client/feedback/dataset/test_helpers.py
imports: from typing import TYPE_CHECKING, Dict, List, Type, Union
  import pytest
  from argilla.client.feedback.dataset.helpers import generate_pydantic_schema_for_metadata
  from argilla.client.feedback.schemas.metadata import FloatMetadataProperty, IntegerMetadataProperty, TermsMetadataProperty
  from argilla.client.feedback.schemas.remote.metadata import RemoteFloatMetadataProperty, RemoteIntegerMetadataProperty, RemoteTermsMetadataProperty
  from tests.pydantic_v1 import ValidationError
label_desc: Use image node_id 2 for calling a global function with example usage: test_generate_pydantic_schema_for_metadata_errors(metadata_properties, validation_data, exception_cls, exception_msg) without return types