code: def test_serialization_text_masker_collapse_mask_token():
      """Make sure text serialization works with collapse mask token."""
  
      AutoTokenizer = pytest.importorskip("transformers").AutoTokenizer
  
      tokenizer = AutoTokenizer.from_pretrained(
          "distilbert-base-cased", use_fast=True
      )
      original_masker = shap.maskers.Text(
          tokenizer, collapse_mask_token=True
      )
  
      with tempfile.TemporaryFile() as temp_serialization_file:
          original_masker.save(temp_serialization_file)
  
          temp_serialization_file.seek(0)
  
          # deserialize masker
          new_masker = shap.maskers.Text.load(temp_serialization_file)
  
      test_text = "I ate a Cannoli"
      test_input_mask = np.array(
          [True, False, True, True, False, True, True, True]
      )
  
      original_masked_output = original_masker(
          test_input_mask, test_text
      )
      new_masked_output = new_masker(test_input_mask, test_text)
  
      assert original_masked_output == new_masked_output
  
file_path: shap/tests/maskers/test_text.py
imports: import tempfile
  import numpy
  import pytest
  import shap
label_desc: Use image node_id 10 for calling a global function with example usage: test_serialization_text_masker_collapse_mask_token() without return types