code: def test_masking_samplers_random_state():
      params = [{"bow": True}, {"bow": False}]
      s1 = MaskingTextSamplers(params, random_state=42)
      s2 = MaskingTextSamplers(params, random_state=42)
      s3 = MaskingTextSamplers(params, random_state=24)
  
      doc = "foo bar baz egg spam egg spam"
  
      samples1, _ = s1.sample_near(doc, n_samples=50)
      samples2, _ = s2.sample_near(doc, n_samples=50)
      samples3, _ = s3.sample_near(doc, n_samples=50)
  
      assert samples1 == samples2
      assert samples1 != samples3
  
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 6 for calling a global function with example usage: test_masking_samplers_random_state() without return types