code: def test_log_records_with_multi_and_single_label_task(api: Argilla):
      dataset = "test_log_records_with_multi_and_single_label_task"
      expected_inputs = ["This is a text"]
  
      delete_ignoring_errors(dataset)
      records = [
          TextClassificationRecord(
              id=0,
              inputs=expected_inputs,
              multi_label=False,
          ),
          TextClassificationRecord(
              id=1,
              inputs=expected_inputs,
              multi_label=True,
          ),
      ]
  
      with pytest.raises(ValidationApiError):
          api.log(
              records,
              name=dataset,
          )
  
      api.log(records[0], name=dataset)
      with pytest.raises(Exception):
          api.log(records[1], name=dataset)
  
imports: from typing import TYPE_CHECKING
  import argilla
  import pytest
  from argilla.client.api import load, log
  from argilla.client.client import Argilla
  from argilla.client.datasets import read_datasets
  from argilla.client.models import TextClassificationRecord, TokenClassificationRecord
  from argilla.client.sdk.commons.errors import BadRequestApiError, GenericApiError, ValidationApiError
  from argilla.client.singleton import init
  from argilla.server.settings import settings
  from tests.factories import WorkspaceFactory
  from tests.integration.utils import delete_ignoring_errors
label_desc: Use image node_id 1 for calling a global function with example usage: test_log_records_with_multi_and_single_label_task(api) without return types