code: def validate_dataset_records(
      dataset: FeedbackDatasetBase,
      records: List[FeedbackRecord],
      attributes_to_validate: typing.Optional[List[str]] = None,
  ) -> None:
      """Validates the records against the schema defined by the `fields`.
  
      Args:
          dataset: the `FeedbackDataset` object to validate the records against.
          records: a list of `FeedbackRecord` objects to validate.
          attributes_to_validate: a list containing the name of the attributes to
              validate from the record. Valid values are: `fields`, `metadata` and `vectors`.
              If not provided, all `fields`, `metadata` and `vectors` are validated. Defaults
              to `None`.
  
      Raises:
          ValueError: if the `fields` schema does not match the `FeedbackRecord.fields` schema.
      """
      attributes_to_validate = attributes_to_validate or [
          "fields",
          "metadata",
          "vectors",
      ]
  
      if "fields" in attributes_to_validate:
          fields_schema = _build_fields_schema(dataset)
  
      if "metadata" in attributes_to_validate:
          metadata_schema = _build_metadata_schema(dataset)
  
      if "vectors" in attributes_to_validate:
          vectors_settings_by_name = {
              vector_settings.name: vector_settings
              for vector_settings in dataset.vectors_settings or []
          }
  
      for record in records:
          if "fields" in attributes_to_validate:
              _validate_record_fields(record, fields_schema)
  
          if "metadata" in attributes_to_validate:
              _validate_record_metadata(record, metadata_schema)
  
          if "vectors" in attributes_to_validate:
              _validate_record_vectors(record, vectors_settings_by_name)
  
imports: import typing
  from typing import Any, Dict, List, Optional, Type, Union
  import httpx
  from argilla.client.feedback.constants import FIELD_TYPE_TO_PYTHON_TYPE
  from argilla.client.feedback.dataset.base import FeedbackDatasetBase
  from argilla.client.feedback.schemas import FeedbackRecord
  from argilla.client.feedback.schemas.enums import MetadataPropertyTypes
  from argilla.client.feedback.schemas.types import AllowedFieldTypes, AllowedMetadataPropertyTypes, AllowedQuestionTypes
  from argilla.client.sdk.v1.datasets import api
  from argilla.client.sdk.v1.datasets.models import FeedbackDatasetModel
  from argilla.client.singleton import active_client
  from argilla.client.workspaces import Workspace
  from argilla.pydantic_v1 import BaseModel, Extra, ValidationError, create_model
label_desc: Use image node_id 7 for calling a global function with example usage: validate_dataset_records(dataset, records, attributes_to_validate) without return types