code: def convert(model, features, target):
      """Convert a  Ridge Regression model to the protobuf spec.
      Parameters
      ----------
      model: LinearSVR
          A trained Ridge Regression model.
  
      feature_names: [str]
          Name of the input columns.
  
      target: str
          Name of the output column.
  
      Returns
      -------
      model_spec: An object of type Model_pb.
          Protobuf representation of the model
      """
      if not (_HAS_SKLEARN):
          raise RuntimeError(
              "scikit-learn not found. scikit-learn conversion API is disabled."
          )
  
      # Check the scikit learn model
      _sklearn_util.check_expected_type(model, _Ridge)
      _sklearn_util.check_fitted(model, lambda m: hasattr(m, "coef_"))
  
      return _MLModel(
          _linear_regression._convert(model, features, target)
      )
  
imports: from ..._deps import _HAS_SKLEARN
  from ...models import MLModel
  from .None import _linear_regression
label_desc: Use image node_id 1 for calling a global function with example usage: convert(model, features, target) and returns: _MLModel