class_docstr: This class is used to implement Python-only models.
  
  The following must be implemented
  - _get_version
  - _get_native_state
  - _native_name (class method)
  - _load_version (class method)
  
  On save, get_native_state is called which must return a dictionary
  containing the state of the object. This must contain
  all the relevant information needed to reconstruct the model.
  
  On load _load_version is used to reconstruct the object.
  
  _native_name must return a globally unique name. This is the name used to
  identify the model.
  
  Example
  -------
  class MyModelMinimal(CustomModel):
      def __init__(self, prediction):
          # We use PythonProxy here so that we get tab completion
          self.__proxy__ = PythonProxy(state)
  
      @classmethod
      def create(cls, prediction):
          return MyModelMinimal({'prediction':prediction})
  
      def predict(self):
          return self.__proxy__['prediction']
  
      def _get_version(self):
          return 0
  
      @classmethod
      def _native_name(cls):
          return "MyModelMinimal"
  
      def _get_native_state(self):
          # return a dictionary completely describing the object
          return self.__proxy__.get_state()
  
      @classmethod
      def _load_version(cls, state, version):
          # loads back from a dictionary
          return MyModelMinimal(state)
  
  
  # a wrapper around logistic classifier
  class MyModelComplicated(CustomModel):
      def __init__(self, state):
          # We use PythonProxy here so that we get tab completion
          self.__proxy__ = PythonProxy(state)
  
      @classmethod
      def create(cls, sf, target):
          classifier = tc.logistic_classifier.create(sf, target=target)
          state = {'classifier':classifier, 'target':target}
          return MyModelComplicated(state)
  
      def predict(self, sf):
          return self.__proxy__['classifier'].predict(sf)
  
      def _get_version(self):
          return 0
  
      @classmethod
      def _native_name(cls):
          return "MyModelComplicated"
  
      def _get_native_state(self):
          # make sure to not accidentally modify the proxy object.
          # take a copy of it.
          state = self.__proxy__.get_state()
  
          # We don't know how to serialize a Python class, hence we need to
          # reduce the classifier to the proxy object before saving it.
          state['classifier'] = state['classifier'].__proxy__
          return state
  
      @classmethod
      def _load_version(cls, state, version):
          assert(version == 0)
          # we need to undo what we did at save and turn the proxy object
          # back into a Python class
          state['classifier'] = LogisticClassifier(state['classifier'])
          return MyModelComplicated(state)
  
  
  # Construct the model
  >>> custom_model = MyModel(sf, glc_model)
  
  ## The model can be saved and loaded like any Turi Create model.
  >>> model.save('my_model_file')
  >>> loaded_model = tc.load_model('my_model_file')
docstr: Returns the name of the model.
  
  ..WARNING:: This function is deprecated, It will be removed in the next
  release. Use type(CustomModel) instead.
  
  Returns
  -------
  out : str
      The name of the model object.
  
  Examples
  --------
  >>> model_name = m.name()
docstr_tok: ["Returns","the","name","of","the","model",".","..","WARNING",":",":","This","function","is","deprecated",",","It","will","be","removed","in","the","next","release",".","Use","type","(","CustomModel",")","instead",".","Returns","--","--","--","-","out",":","str","The","name","of","the","model","object",".","Examples","--","--","--","--",">",">",">","model_name","=","m.name","(",")"]
code: def name(self):
      """
      Returns the name of the model.
  
      ..WARNING:: This function is deprecated, It will be removed in the next
      release. Use type(CustomModel) instead.
  
      Returns
      -------
      out : str
          The name of the model object.
  
      Examples
      --------
      >>> model_name = m.name()
      """
      warnings.warn(
          "This function is deprecated. It will be removed in the next release. Please use python's builtin type function instead."
      )
      return self.__class__.__name__
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  import turicreate._connect.main
  from turicreate.data_structures.sframe import SFrame
  import turicreate.extensions
  from turicreate.extensions import _wrap_function_return
  from turicreate.toolkits._internal_utils import _toolkit_serialize_summary_struct
  from turicreate.util import _make_internal_url
  from turicreate.toolkits._main import ToolkitError
  from turicreate._deps.minimal_package import _minimal_package_import_check
  import turicreate.util._file_util
  import os
  from copy import copy
  import six
  import warnings
label_desc: Use image node_id 2 for calling the CustomModel obj's underlying member method code with example usage: obj.name() and returns: self