code: def test_with_similar_frequent_substrings(
      dataset_with_similar_frequent_substrings,
  ):
      # Arrange
      min_substrings = 1
      min_substring_ratio = 0.05
      check = FrequentSubstrings(
          min_substring_ratio=min_substring_ratio,
          significant_substring_ratio=0.2,
      ).add_condition_zero_result(min_substrings=1)
  
      # Act
      result = check.run(
          dataset=dataset_with_similar_frequent_substrings
      )
      conditions_decision = check.conditions_decision(result)
  
      # Assert
      expected_value = {
          "Text": {
              0: "Do not worry be",
              1: "Explicit is better than",
              2: "Simple is better than complex",
          },
          "Frequency": {0: 0.5, 1: 0.4, 2: 0.2},
          "% In data": {0: "50%", 1: "40%", 2: "20%"},
          "Sample IDs": {
              0: [0, 3, 5, 8, 9],
              1: [0, 1, 4, 6],
              2: [2, 7],
          },
          "Number of Samples": {0: 5, 1: 4, 2: 2},
      }
      assert_that(
          conditions_decision[0],
          equal_condition_result(
              is_pass=False,
              details="Found 3 substrings with ratio above threshold",
              name=f"No more than {min_substrings} substrings with ratio above {min_substring_ratio}",
          ),
      )
      assert_result_value(result.value, expected_value)
  
file_path: deepchecks/tests/nlp/checks/data_integrity/frequent_substrings_test.py
imports: import pytest
  from hamcrest import *
  from deepchecks.nlp.checks.data_integrity.frequent_substrings import FrequentSubstrings
  from deepchecks.nlp.text_data import TextData
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 7 for calling a global function with example usage: test_with_similar_frequent_substrings(dataset_with_similar_frequent_substrings) without return types