code: def test_estimator_svc(
      tmp_root_dir: Path,
      dataset: Dataset,
      template: str,
      language: str,
      kernel: str,
      gamma: Union[str, float],
  ):
      """Test and compare different SVM classifiers."""
      orig_est = SVC(kernel=kernel, gamma=gamma, random_state=1)
  
      if not can(orig_est, language, template, "predict"):
          pytest.skip(
              "Skip unsupported estimator/"
              "language/template combination"
          )
  
      # Estimator:
      x, y = dataset.data, dataset.target
      orig_est.fit(X=x, y=y)
      est = Estimator(orig_est)
  
      # Samples:
      test_x = np.vstack((dataset_uniform_x(x), dataset_generate_x(x)))
  
      # Directory:
      if not isinstance(gamma, str):
          gamma = str(gamma).replace(".", "_")
      tmp_dir = fs_mkdir(
          tmp_root_dir,
          [
              ("test", "estimator_svc"),
              ("dataset", dataset.name),
              ("language", language),
              ("template", template),
              ("kernel", kernel),
              ("gamma", gamma),
          ],
      )
  
      try:
          score = est.test(
              test_x,
              language=language,
              template=template,
              directory=tmp_dir,
              delete_created_files=False,
          )
      except exception.NotSupportedYetError as e:
          if "template" == "precomputed":
              msg = "The passed kernel `precomputed` is not supported."
              assert msg in str(e)
      except exception.CodeTooLarge:
          msg = (
              "Code too large for the combination: "
              "language: {}, template: {}, dataset: {}"
              "".format(language, template, dataset.name)
          )
          warnings.warn(msg)
      except Exception as e:
          pytest.fail("Unexpected exception ... " + str(e))
      else:
          assert score == 1.0
  
file_path: sklearn-porter/tests/estimator/SVCTest.py
imports: from pathlib import Path
  from typing import Union
  import warnings
  import pytest
  import numpy
  from sklearn.svm import SVC
  from sklearn_porter.Estimator import Estimator, can
  from sklearn_porter import exceptions
  from tests.commons import Dataset, DATASETS
  from tests.utils import dataset_uniform_x, dataset_generate_x, fs_mkdir
  from tests.EstimatorTest import tmp_root_dir
label_desc: Use image node_id 1 for calling a global function with example usage: test_estimator_svc(tmp_root_dir, dataset, template, language, kernel, gamma) without return types