code: def assert_result_value(result_value, expected_value=None):
      assert_that(result_value, instance_of(dict))
      assert_that(
          result_value,
          has_entries(
              {
                  "Text": instance_of(dict),
                  "Frequency": instance_of(dict),
                  "% In data": instance_of(dict),
                  "Sample IDs": instance_of(dict),
                  "Number of Samples": instance_of(dict),
              }
          ),
      )
      if expected_value is not None:
          assert_that(len(result_value), equal_to(len(expected_value)))
          for key in result_value.keys():
              assert_that(
                  sorted(list(result_value[key].values())),
                  equal_to(sorted(list(expected_value[key].values()))),
              )
  
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 9 for calling a global function with example usage: assert_result_value(result_value, expected_value) without return types