code: def test_wasserstein_detector():
      _test_detector_class(
          torchdrift.detectors.WassersteinDriftDetector
      )
      _test_detector_class_fit_bootstrap(
          torchdrift.detectors.WassersteinDriftDetector
      )
  
      def partial_wasserstein(return_p_value=False):
          return torchdrift.detectors.WassersteinDriftDetector(
              return_p_value=return_p_value, fraction_to_match=0.5
          )
  
      _test_detector_class(
          torchdrift.detectors.WassersteinDriftDetector
      )
      _test_detector_class(partial_wasserstein)
      _test_detector_class_fit_bootstrap(partial_wasserstein)
  
      x = torch.randn(5, 5)
      y = torch.randn(5, 5) + 1.0
      d, p, c = torchdrift.detectors.wasserstein(
          x, y, return_coupling=True
      )
      d, c = torchdrift.detectors.wasserstein(
          x, y, return_coupling=True, n_perm=None
      )
  
file_path: TorchDrift/test/test_detectors.py
imports: import pytest
  import functools
  import torchdrift
  import torch
label_desc: Use image node_id 7 for calling a global function with example usage: test_wasserstein_detector() and returns: torchdrift