code: def test_with_duplicates(dataset_with_duplicates: ProblematicDataset):
      # Arrange
      dataset = dataset_with_duplicates.dataset
      check = TextDuplicates().add_condition_ratio_less_or_equal(0)
  
      # Act
      result = check.run(dataset=dataset)
      conditions_decisions = check.conditions_decision(result)
  
      # Assert
      assert_that(result, instance_of(CheckResult))
  
      assert_that(
          result.value,
          has_entries(
              {
                  "percent_of_duplicates": equal_to(
                      dataset_with_duplicates.percent_of_duplicates
                  ),
                  "duplicates": instance_of(pd.DataFrame),
              }
          ),
      )
      assert_that(
          conditions_decisions[0],
          equal_condition_result(
              is_pass=False,
              name=f"Duplicate data ratio is less or equal to {format_percent(0)}",
              details=f"Found {format_percent(dataset_with_duplicates.percent_of_duplicates)} duplicate data",
          ),  # type: ignore
      )
  
      duplicates = result.value["duplicates"]
      assert_result_dataframe(
          duplicates,
          duplicates_variations=dataset_with_duplicates.duplicates,
      )
      assert_display(display=result.display)
  
file_path: deepchecks/tests/nlp/checks/data_integrity/text_duplicates_test.py
imports: import typing
  import pandas
  import pytest
  from hamcrest import *
  from deepchecks.core.check_result import CheckResult
  from deepchecks.nlp.checks import TextDuplicates
  from deepchecks.nlp.text_data import TextData
  from deepchecks.utils.strings import format_percent
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 4 for calling a global function with example usage: test_with_duplicates(dataset_with_duplicates) without return types