code: def test_copy_dataset_with_rules(
      mocked_client: SecuredClient, argilla_user: User
  ):
      dataset_name = "test_copy_dataset_with_rules"
  
      mocked_client.delete(f"/api/datasets/{dataset_name}")
  
      mocked_client.post(
          "/api/datasets",
          json={
              "name": dataset_name,
              "task": TaskType.text_classification.value,
              "workspace": argilla_user.username,
          },
      )
  
      mocked_client.post(
          f"/api/datasets/TextClassification/{log_dataset}/labeling/rules",
          json={"query": "a query", "label": "LALA"},
      )
  
      copied_dataset = f"{dataset_name}_copy"
      delete_ignoring_errors(copied_dataset)
      copy(dataset_name, name_of_copy=copied_dataset)
  
      assert [
          {"q": r.query, "l": r.label}
          for r in load_rules(copied_dataset)
      ] == [
          {"q": r.query, "l": r.label} for r in load_rules(dataset_name)
      ]
  
imports: import httpx
  import pytest
  from argilla import User
  from argilla.client.api import copy, delete, load
  from argilla.client.models import TextClassificationRecord
  from argilla.client.sdk.datasets.models import TaskType
  from argilla.client.sdk.text_classification.models import CreationTextClassificationRecord, TextClassificationBulkData
  from argilla.labeling.text_classification import Rule, add_rules, delete_rules, load_rules, update_rules
  from argilla.labeling.text_classification.rule import RuleNotAppliedError
  from argilla.server.errors import EntityNotFoundError
  from tests.integration.helpers import SecuredClient
  from tests.integration.utils import delete_ignoring_errors
label_desc: Use image node_id 13 for calling a global function with example usage: test_copy_dataset_with_rules(mocked_client, argilla_user) without return types