code: def test_wrong_token_prediction_format(
      text_token_classification_dataset_mock,
  ):
      # Arrange
      emtpy_suite = Suite("Empty Suite")
  
      # Act & Assert
  
      # Length of predictions does not match length of dataset:
      assert_that(
          calling(emtpy_suite.run).with_args(
              train_dataset=text_token_classification_dataset_mock,
              train_predictions=[[1, 2], [3, 4]],
          ),
          raises(
              ValidationError,
              'Check requires token-classification predictions for the "Train" '
              "dataset to have 3 rows, same as dataset",
          ),
      )
  
      # Not a list:
      assert_that(
          calling(emtpy_suite.run).with_args(
              train_dataset=text_token_classification_dataset_mock,
              train_predictions="PER",
          ),
          raises(
              ValidationError,
              r"Check requires token-classification predictions for "
              r'the "Train" dataset to be of a type sequence\[sequence\[str\]\] or '
              r"sequence\[sequence\[int\]\]",
          ),
      )
  
      # Not a list of lists:
      assert_that(
          calling(emtpy_suite.run).with_args(
              train_dataset=text_token_classification_dataset_mock,
              train_predictions=[3, 3, 3],
          ),
          raises(
              ValidationError,
              r"Check requires token-classification predictions for the "
              r'"Train" dataset to be of a type sequence\[sequence\[str\]\] or '
              r"sequence\[sequence\[int\]\]",
          ),
      )
  
      # Mixed strings and integers:
      assert_that(
          calling(emtpy_suite.run).with_args(
              train_dataset=text_token_classification_dataset_mock,
              train_predictions=[
                  ["B-PER", "O", 1, "O", "O"],
                  ["B-PER", "O", "O", "B-GEO", "O", "B-GEO"],
                  ["O", "O", "O", "O", "O", "O", "O", "O"],
              ],
          ),
          raises(
              ValidationError,
              r"Check requires token-classification predictions for "
              r'the "Train" dataset to be of a type sequence\[sequence\[str\]\] '
              r"or sequence\[sequence\[int\]\]",
          ),
      )
  
      # Length of predictions does not match length of tokenized text:
      assert_that(
          calling(emtpy_suite.run).with_args(
              train_dataset=text_token_classification_dataset_mock,
              train_predictions=[
                  ["B-PER"],
                  ["B-PER", "O", "O", "B-GEO", "O", "B-GEO"],
                  ["O", "O", "O", "O", "O", "O", "O", "O"],
              ],
          ),
          raises(
              ValidationError,
              'Check requires token-classification predictions for the "Train" dataset '
              "to have the same number of tokens as the input text",
          ),
      )
  
file_path: deepchecks/tests/nlp/test_context.py
imports: from hamcrest import assert_that, calling, close_to, raises
  from deepchecks.core.errors import ValidationError
  from deepchecks.nlp import Suite
  from deepchecks.nlp.checks import LabelDrift, SingleDatasetPerformance
label_desc: Use image node_id 3 for calling a global function with example usage: test_wrong_token_prediction_format(text_token_classification_dataset_mock) without return types