code: def test_svm_optimization_error():
      """Test SVM detector raises correct errors for wrong optimization kwargs."""
  
      with pytest.raises(ValueError) as err:
          _ = SVM(
              n_components=10,
              backend="pytorch",
              kernel=GaussianRBF(torch.tensor(2)),
              optimization="not_an_option",
              device="cpu",
              nu=0.1,
          )
  
      assert (
          str(err.value)
          == "Optimization not_an_option not recognized. Choose from `sgd` or `bgd`."
      )
  
file_path: alibi-detect/alibi_detect/od/tests/test__svm/test__svm.py
imports: import pytest
  import numpy
  import torch
  from alibi_detect.od._svm import SVM
  from alibi_detect.exceptions import NotFittedError
  from alibi_detect.utils.pytorch import GaussianRBF
  from sklearn.datasets import make_moons
label_desc: Use image node_id 3 for calling a global function with example usage: test_svm_optimization_error() without return types