code: def add_records(
      client: httpx.Client, id: UUID, records: List[Dict[str, Any]]
  ) -> Response[Union[ErrorMessage, HTTPValidationError]]:
      """Sends a POST request to `/api/v1/datasets/{id}/records` endpoint to add a list of `FeedbackTask` records.
  
      Args:
          client: the authenticated Argilla client to be used to send the request to the API.
          id: the id of the dataset to add the records to.
          records: the list of records to be added to the dataset.
  
      Returns:
          A `Response` object with the response itself, and/or the error codes if applicable.
      """
      url = f"/api/v1/datasets/{id}/records"
  
      active_user_id = None
  
      for record in records:
          cleaned_responses = []
          response_without_user_id = False
          for response in record.get("responses", []):
              if response.get("user_id") is None:
                  if response_without_user_id:
                      warnings.warn(
                          f"Multiple responses without `user_id` found in record {record}, so just the first one will be"
                          " used while the rest will be ignored."
                      )
                      continue
                  else:
                      if active_user_id is None:
                          active_user_id = client.get("api/me").json()[
                              "id"
                          ]
                      response["user_id"] = active_user_id
                  response_without_user_id = True
              if isinstance(response.get("user_id"), UUID):
                  response["user_id"] = str(response.get("user_id"))
              cleaned_responses.append(response)
          if len(cleaned_responses) > 0:
              record["responses"] = cleaned_responses
  
          for suggestion in record.get("suggestions", []):
              if isinstance(suggestion.get("question_id"), UUID):
                  suggestion["question_id"] = str(
                      suggestion.get("question_id")
                  )
  
      response = client.post(url=url, json={"items": records})
  
      if response.status_code == 204:
          return Response.from_httpx_response(response)
      return handle_response_error(response)
  
imports: import warnings
  from typing import Any, Dict, List, Optional, Union
  from uuid import UUID
  import httpx
  from argilla.client.sdk.commons.errors_handler import handle_response_error
  from argilla.client.sdk.commons.models import ErrorMessage, HTTPValidationError, Response
  from argilla.client.sdk.v1.datasets.models import FeedbackDatasetModel, FeedbackFieldModel, FeedbackListVectorSettingsModel, FeedbackMetadataPropertyModel, FeedbackMetricsModel, FeedbackQuestionModel, FeedbackRecordsModel, FeedbackRecordsSearchModel, FeedbackRecordsSearchVectorQuery, FeedbackResponseStatusFilter, FeedbackVectorSettingsModel
label_desc: Use image node_id 8 for calling a global function with example usage: add_records(client, id, records) and returns: handle_response_error, Response