code: def convert(model, features, target):
  
      
      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, LinearRegression)
      _sklearn_util.check_fitted(model, lambda m: hasattr(m, 'coef_'))
  
      return _MLModel(_convert(model, features, target))
docs: Convert a linear regression model to the protobuf spec.
      Parameters
      ----------
      model: LinearRegression
          A trained linear regression encoder 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