code: def test_check_execution_with_problematic_datasets(
      problematic_train_test_split: ProblematicTrainTestSplit,
  ):
      # Arrange
      expected_ratio = problematic_train_test_split.duplicates_ration
      train = problematic_train_test_split.train
      test = problematic_train_test_split.test
      check = TrainTestSamplesMix().add_condition_duplicates_ratio_less_or_equal(
          0.1
      )
  
      # Act
      result = check.run(train_dataset=train, test_dataset=test)
      conditions_decisions = check.conditions_decision(result)
  
      # Assert
      assert_that(
          result.value,
          has_entries(
              {
                  "ratio": expected_ratio,
                  "duplicates": instance_of(pd.DataFrame),
              }
          ),
      )
  
      assert_that(
          conditions_decisions[0],
          equal_condition_result(
              is_pass=False,
              details=(
                  "Percent of test data samples that appear in "
                  f"train data: {format_percent(expected_ratio)}"
              ),
              name=(
                  "Percentage of test data samples that appear "
                  f"in train data is less or equal to 10%"
              ),
          ),  # type: ignore
      )
  
      duplicates = result.value["duplicates"]
      assert_result_dataframe(
          duplicates, problematic_train_test_split.duplicates
      )
      assert_display(result.display)
  
imports: import typing
  import pandas
  import pytest
  from hamcrest import *
  from deepchecks.nlp.checks import TrainTestSamplesMix
  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_check_execution_with_problematic_datasets(problematic_train_test_split) without return types