<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create(observation_data, user_id='user_id', item_id='item_id', target=None, user_data=None, item_data=None, ranking=True, verbose=True):
 """ A unified interface for training recommender models. Based on simple characteristics of the data, a type of model is selected and trained. The trained model can be used to predict ratings and make recommendations. To use specific options of a desired model, use the ``create`` function of the corresponding model. Parameters observation_data : SFrame The dataset to use for training the model. It must contain a column of user ids and a column of item ids. Each row represents an observed interaction between the user and the item. The (user, item) pairs are stored with the model so that they can later be excluded from recommendations if desired. It can optionally contain a target ratings column. All other columns are interpreted by the underlying model as side features for the observations. The user id and item id columns must be of type 'int' or 'str'. The target column must be of type 'int' or 'float'. user_id : string, optional The name of the column in `observation_data` that corresponds to the user id. item_id : string, optional The name of the column in `observation_data` that corresponds to the item id. target : string, optional Name of the column in `observation_data` containing ratings given by users to items, if applicable. user_data : SFrame, optional Side information for the users. This SFrame must have a column with the same name as what is specified by the `user_id` input parameter. `user_data` can provide any amount of additional user-specific information. item_data : SFrame, optional Side information for the items. This SFrame must have a column with the same name as what is specified by the `item_id` input parameter. `item_data` can provide any amount of additional item-specific information. ranking : bool, optional Determine whether or not the goal is to rank items for each user. verbose : bool, optional Enables verbose output. Returns ------- out : A trained model. - If a target column is given, then :class:`turicreate.recommender.factorization_recommender.FactorizationRecommender`. - If no target column is given, then :class:`turicreate.recommender.item_similarity_recommender.ItemSimilarityRecommender`. Examples -------- **Basic usage** Given basic user-item observation data, an :class:`~turicreate.recommender.item_similarity_recommender.ItemSimilarityRecommender` is created: **Creating a model for ratings data** This trains a :class:`~turicreate.recommender.factorization_recommender.FactorizationRecommender` that can predict target ratings: **Creating specific models** Specific models allow for a number of additional options during create. The available recommenders are all in the turicreate.recommender namespace. For the complete list of acceptable options, please refer to the documentation for individual models. Such options can be passed to the underlying model just like any other parameter. For example, the following code creates an :class:`~turicreate.recommender.ItemSimilarityRecommender` with a space-saving option called `only_top_k`. The returned model stores only the 2 most similar items for item: """


    if not (isinstance(observation_data, _SFrame)):
        raise TypeError('observation_data input must be a SFrame')

    side_data = (user_data is not None) or (item_data is not None)
    if user_data is not None:
        if not isinstance(user_data, _SFrame):
            raise TypeError('Provided user_data must be an SFrame.')
    if item_data is not None:
        if not isinstance(item_data, _SFrame):
            raise TypeError('Provided item_data must be an SFrame.')

    if target is None:
        if ranking:
            if side_data:
                method = 'ranking_factorization_recommender'
            else:
                method = 'item_similarity'
        else:
            if side_data:
                method = 'ranking_factorization_recommender'
            else:
                method = 'item_similarity'
    else:
        if ranking:
            if side_data:
                method = 'ranking_factorization_recommender'
            else:
                method = 'ranking_factorization_recommender'
        else:
            if side_data:
                method = 'factorization_recommender'
            else:
                method = 'factorization_recommender'

    opts = {'observation_data': observation_data,
            'user_id': user_id,
            'item_id': item_id,
            'target': target,
            'user_data': user_data,
            'item_data': item_data}


    if method == "item_similarity":
        return _turicreate.recommender.item_similarity_recommender.create(**opts)
    elif method == "factorization_recommender":
        return _turicreate.recommender.factorization_recommender.create(**opts)
    elif method == "ranking_factorization_recommender":
        return _turicreate.recommender.ranking_factorization_recommender.create(**opts)
    else:
        raise RuntimeError("Provided method not recognized.")