code: def test_delete_records_from_dataset(argilla_user: "User"):
      dataset = "test_delete_records_from_dataset"
  
      init(
          api_key=argilla_user.api_key, workspace=argilla_user.username
      )
      delete_ignoring_errors(dataset)
      log(
          name=dataset,
          records=[
              TextClassificationRecord(
                  id=i, text="This is the text", metadata=dict(idx=i)
              )
              for i in range(0, 50)
          ],
      )
  
      matched, processed = delete_records(
          name=dataset, ids=[10], discard_only=True
      )
      assert matched, processed == (1, 1)
  
      ds = load(name=dataset)
      assert len(ds) == 50
  
      time.sleep(1)
      matched, processed = delete_records(
          name=dataset, query="id:10", discard_only=False
      )
      assert matched, processed == (1, 1)
  
      time.sleep(1)
      ds = load(name=dataset)
      assert len(ds) == 49
  
file_path: argilla/tests/integration/test_delete_records_from_datasets.py
imports: import time
  import pytest
  from argilla.client.api import delete_records, load, log
  from argilla.client.client import Argilla
  from argilla.client.models import TextClassificationRecord
  from argilla.client.sdk.commons.errors import ForbiddenApiError
  from argilla.client.singleton import init
  from argilla.server.models import User, UserRole
  from tests.factories import AnnotatorFactory, UserFactory, 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_delete_records_from_dataset(argilla_user) without return types