code: def _generate_base_svm_classifier_spec(model):
      """
      Takes an SVM classifier produces a starting spec using the parts.  that are
      shared between all SVMs.
      """
      if not (_HAS_SKLEARN):
          raise RuntimeError(
              "scikit-learn not found. scikit-learn conversion API is disabled."
          )
  
      check_fitted(model, lambda m: hasattr(m, "support_vectors_"))
  
      spec = _Model_pb2.Model()
      spec.specificationVersion = _SPECIFICATION_VERSION
      svm = spec.supportVectorClassifier
  
      _set_kernel(model, svm)
  
      for cur_rho in model.intercept_:
          if len(model.classes_) == 2:
              # For some reason Scikit Learn doesn't negate for binary classification
              svm.rho.append(cur_rho)
          else:
              svm.rho.append(-cur_rho)
  
      for i in range(len(model._dual_coef_)):
          svm.coefficients.add()
          for cur_alpha in model._dual_coef_[i]:
              svm.coefficients[i].alpha.append(cur_alpha)
  
      for cur_src_vector in model.support_vectors_:
          cur_dest_vector = svm.denseSupportVectors.vectors.add()
          for i in cur_src_vector:
              cur_dest_vector.values.append(i)
      return spec
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/sklearn/_SVC.py
imports: from ...proto import Model_pb2
  from ...proto import SVM_pb2
  from ...None import SPECIFICATION_VERSION
  from ...models._interface_management import set_classifier_interface_params
  from ..._deps import _HAS_SKLEARN
  from ...models import MLModel
  from ._svm_common import _set_kernel
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_base_svm_classifier_spec(model) and returns: spec