code: def test_sgd_bgd_diffs():
      n_components = 300
      bgd_svm = BgdSVMTorch(
          n_components=n_components,
          kernel=GaussianRBF(sigma=torch.tensor(2)),
          nu=0.05,
      )
      sgd_svm = SgdSVMTorch(
          n_components=n_components,
          kernel=GaussianRBF(sigma=torch.tensor(2)),
          nu=0.05,
      )
  
      mean = [8, 8]
      cov = [[2.0, 0.0], [0.0, 1.0]]
      x_ref = torch.tensor(
          np.random.multivariate_normal(mean, cov, 1000)
      )
      bgd_svm.fit(x_ref)
      sgd_svm.fit(x_ref)
  
      test_x = x_ref[:1000]
      diffs = (sgd_svm.score(test_x) - bgd_svm.score(test_x)).numpy()
      assert np.abs(diffs.mean()) < 0.1
  
file_path: alibi-detect/alibi_detect/od/tests/test__svm/test__svm_pytorch_backend.py
imports: import pytest
  import numpy
  import torch
  from alibi_detect.utils.pytorch.kernels import GaussianRBF
  from alibi_detect.od.pytorch.svm import BgdSVMTorch, SgdSVMTorch
  from alibi_detect.exceptions import NotFittedError, ThresholdNotInferredError
label_desc: Use image node_id 5 for calling a global function with example usage: test_sgd_bgd_diffs() without return types