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: Print a summary of the model. The summary includes a description of
  training data, options, hyper-parameters, and statistics measured
  during model creation.
  
  Parameters
  ----------
  output : str, None
      The type of summary to return.
  
      - None or 'stdout' : print directly to stdout.
  
      - 'str' : string of summary
  
      - 'dict' : a dict with 'sections' and 'section_titles' ordered
        lists. The entries in the 'sections' list are tuples of the form
        ('label', 'value').
  
  Examples
  --------
  >>> m.summary()
docstr_tok: ["Print","a","summary","of","the","model",".","The","summary","includes","a","description","of","training","data",",","options",",","hyper-parameters",",","and","statistics","measured","during","model","creation",".","Parameters","--","--","--","--","--","output",":","str",",","None","The","type","of","summary","to","return",".","-","None","or","'stdout","'",":","print","directly","to","stdout",".","-","'str","'",":","string","of","summary","-","'dict","'",":","a","dict","with","'sections","'","and","'section_titles","'","ordered","lists",".","The","entries","in","the","'sections","'","list","are","tuples","of","the","form","(","'label","'",",","'value","'",")",".","Examples","--","--","--","--",">",">",">","m.summary","(",")"]
code: def summary(self, output=None):
      """
      Print a summary of the model. The summary includes a description of
      training data, options, hyper-parameters, and statistics measured
      during model creation.
  
      Parameters
      ----------
      output : str, None
          The type of summary to return.
  
          - None or 'stdout' : print directly to stdout.
  
          - 'str' : string of summary
  
          - 'dict' : a dict with 'sections' and 'section_titles' ordered
            lists. The entries in the 'sections' list are tuples of the form
            ('label', 'value').
  
      Examples
      --------
      >>> m.summary()
      """
      if output is None or output == "stdout":
          try:
              print(self.__repr__())
          except:
              return self.__class__.__name__
      elif output == "str":
          return self.__repr__()
      elif output == "dict":
          return _toolkit_serialize_summary_struct(
              self, *self._get_summary_struct()
          )
      else:
          raise ToolkitError(
              "Unsupported argument "
              + str(output)
              + ' for "summary" parameter.'
          )
  
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 3 for calling the CustomModel obj's underlying member method code with example usage: obj.summary(output) and returns: self, self, _toolkit_serialize_summary_struct