code: def test_masking_text_sampler():
      sampler = MaskingTextSampler(bow=False)
      samples, sims = sampler.sample_near(
          "foo bar bar baz", n_samples=10000
      )
      assert "foo bar bar " in samples
      assert "foo  bar baz" in samples
      assert "foo bar bar baz" not in samples
      assert "   " in samples
  
file_path: eli5/tests/test_samplers.py
imports: from functools import partial
  import numpy
  import pytest
  from hypothesis import given
  from hypothesis.strategies import integers, text
  from eli5.lime.samplers import MaskingTextSampler, MaskingTextSamplers, UnivariateKernelDensitySampler, MultivariateKernelDensitySampler
  from sklearn.neighbors import KernelDensity
label_desc: Use image node_id 4 for calling a global function with example usage: test_masking_text_sampler() without return types