docstr: Tests obtaining perturbations from tokens and a mask.
docstr_tok: ["Tests","obtaining","perturbations","from","tokens","and","a","mask","."]
code: def test_get_perturbations_returns_correctly_masked_string(self):
      """Tests obtaining perturbations from tokens and a mask."""
      sentence = "It is a great movie but also somewhat bad ."
      tokens = sentence.split()
      # We create a mock mask with False for tokens with an 'a', True otherwise.
      masks = np.array(
          [[False if "a" in token else True for token in tokens]]
      )
      perturbations = list(
          lime.get_perturbations(tokens, masks, mask_token="_")
      )
      expected = "It is _ _ movie but _ _ _ ."
      self.assertEqual(expected, perturbations[0])
  
imports: import collections
  import functools
  from absl.testing import absltest
  from absl.testing import parameterized
  from lime import lime_text
  from lit_nlp.components.citrus import lime
  from lit_nlp.components.citrus import utils
  import numpy
  from scipy import special
  from scipy import stats
label_desc: Use image node_id 4 for calling the LimeTest obj's underlying member method code with example usage: obj.test_get_perturbations_returns_correctly_masked_string() without return types