code: def test_multivariate_kde_sampler():
      feat1 = np.random.normal(size=500)
      feat2 = feat1 * 2 + np.random.normal(size=500) * 0.01
      X = np.array([feat1, feat2]).T
  
      s = MultivariateKernelDensitySampler(random_state=42)
      s.fit(X)
  
      # no extreme bandwidths
      assert 0.01 < s.kde_.bandwidth < 5
  
      # check sampling results
      X_sampled, sims = s.sample_near(X[0], 1000)
      feat1_sampled = X_sampled[:, 0]
      feat2_sampled = X_sampled[:, 1]
  
      # feature interaction should be preserved
      assert abs((feat1_sampled * 2 - feat2_sampled).mean()) < 0.05
  
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 8 for calling a global function with example usage: test_multivariate_kde_sampler() without return types