code: def build_list_response(
      response: httpx.Response, item_class: Type[T]
  ) -> Response[Union[List[T], HTTPValidationError, ErrorMessage]]:
      parsed_response = response.json()
  
      if 200 <= response.status_code < 400:
          parsed_response = [item_class(**r) for r in parsed_response]
          return Response(
              status_code=response.status_code,
              content=response.content,
              headers=response.headers,
              parsed=parsed_response,
          )
  
      return handle_response_error(response, item_class=item_class)
  
file_path: argilla/src/argilla/client/sdk/commons/api.py
imports: import json
  from typing import Any, Dict, List, Optional, Type, TypeVar, Union
  import httpx
  from argilla.client.sdk.client import AuthenticatedClient
  from argilla.client.sdk.commons.errors import GenericApiError
  from argilla.client.sdk.commons.errors_handler import handle_response_error
  from argilla.client.sdk.commons.models import BulkResponse, ErrorMessage, HTTPValidationError, Response
  from argilla.client.sdk.text2text.models import Text2TextBulkData
  from argilla.client.sdk.text_classification.models import TextClassificationBulkData
  from argilla.client.sdk.token_classification.models import TokenClassificationBulkData
label_desc: Use image node_id 2 for calling a global function with example usage: build_list_response(response, item_class) and returns: handle_response_error, Response