class_docstr: The abstract class for Turi Create recommender system models. This class
  defines methods common to all recommender system models, but leaves unique
  model details to separate model classes.
class_docstr_tok: ["The","abstract","class","for","Turi","Create","recommender","system","models",".","This","class","defines","methods","common","to","all","recommender","system","models",",","but","leaves","unique","model","details","to","separate","model","classes","."]
docstr: Processes the dataset parameter for type correctness.
  Returns it as an SFrame.
docstr_tok: ["Processes","the","dataset","parameter","for","type","correctness",".","Returns","it","as","an","SFrame","."]
code: def __prepare_dataset_parameter(self, dataset):
      """
      Processes the dataset parameter for type correctness.
      Returns it as an SFrame.
      """
  
      # Translate the dataset argument into the proper type
      if not isinstance(dataset, _SFrame):
  
          def raise_dataset_type_exception():
              raise TypeError(
                  "The dataset parameter must be either an SFrame, "
                  "or a dictionary of (str : list) or (str : value)."
              )
  
          if type(dataset) is dict:
              if not all(
                  type(k) is str for k in _six.iterkeys(dataset)
              ):
                  raise_dataset_type_exception()
  
              if all(
                  type(v) in (list, tuple, _array.array)
                  for v in _six.itervalues(dataset)
              ):
                  dataset = _SFrame(dataset)
              else:
                  dataset = _SFrame(
                      {k: [v] for k, v in _six.iteritems(dataset)}
                  )
          else:
              raise_dataset_type_exception()
  
      return dataset
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  import random
  import array
  import logging
  import time
  import six
  from turicreate.toolkits import _coreml_utils
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits._model import Model
  from turicreate.toolkits._internal_utils import _toolkit_repr_print, _precomputed_field
  import turicreate.aggregate
  from turicreate.data_structures.sarray import SArray
  from turicreate.data_structures.sframe import SFrame
  from turicreate._deps import numpy, HAS_NUMPY
label_desc: Use image node_id 11 for calling the _Recommender obj's underlying member method code with example usage: obj.__prepare_dataset_parameter(dataset) and returns: dataset