Get the k most similar items for each item in items.

        Each type of recommender has its own model for the similarity
        between items. For example, the item_similarity_recommender will
        return the most similar items according to the user-chosen
        similarity; the factorization_recommender will return the
        nearest items based on the cosine similarity between latent item
        factors.

        Parameters
        ----------
        items : SArray or list; optional
            An :class:`~turicreate.SArray` or list of item ids for which to get
            similar items. If 'None', then return the `k` most similar items for
            all items in the training set.

        k : int, optional
            The number of similar items for each item.

        verbose : bool, optional
            Progress printing is shown.

        Returns
        -------
        out : SFrame
            A SFrame with the top ranked similar items for each item. The
            columns `item`, 'similar', 'score' and 'rank', where
            `item` matches the item column name specified at training time.
            The 'rank' is between 1 and `k` and 'score' gives the similarity
            score of that item. The value of the score depends on the method
            used for computing item similarities.

        Examples
        --------

        >>> sf = turicreate.SFrame({'user_id': ["0", "0", "0", "1", "1", "2", "2", "2"],
                                  'item_id': ["a", "b", "c", "a", "b", "b", "c", "d"]})
        >>> m = turicreate.item_similarity_recommender.create(sf)
        >>> nn = m.get_similar_items()

def get_similar_items(self, items=None, k=10, verbose=False):
        """
        Get the k most similar items for each item in items.

        Each type of recommender has its own model for the similarity
        between items. For example, the item_similarity_recommender will
        return the most similar items according to the user-chosen
        similarity; the factorization_recommender will return the
        nearest items based on the cosine similarity between latent item
        factors.

        Parameters
        ----------
        items : SArray or list; optional
            An :class:`~turicreate.SArray` or list of item ids for which to get
            similar items. If 'None', then return the `k` most similar items for
            all items in the training set.

        k : int, optional
            The number of similar items for each item.

        verbose : bool, optional
            Progress printing is shown.

        Returns
        -------
        out : SFrame
            A SFrame with the top ranked similar items for each item. The
            columns `item`, 'similar', 'score' and 'rank', where
            `item` matches the item column name specified at training time.
            The 'rank' is between 1 and `k` and 'score' gives the similarity
            score of that item. The value of the score depends on the method
            used for computing item similarities.

        Examples
        --------

        >>> sf = turicreate.SFrame({'user_id': ["0", "0", "0", "1", "1", "2", "2", "2"],
                                  'item_id': ["a", "b", "c", "a", "b", "b", "c", "d"]})
        >>> m = turicreate.item_similarity_recommender.create(sf)
        >>> nn = m.get_similar_items()
        """

        if items is None:
            get_all_items = True
            items = _SArray()
        else:
            get_all_items = False

        if isinstance(items, list):
            items = _SArray(items)

        def check_type(arg, arg_name, required_type, allowed_types):
            if not isinstance(arg, required_type):
                raise TypeError("Parameter " + arg_name + " must be of type(s) "
                                + (", ".join(allowed_types) )
                                + "; Type '" + str(type(arg)) + "' not recognized.")

        check_type(items, "items", _SArray, ["SArray", "list"])
        check_type(k, "k", int, ["int"])

        return self.__proxy__.get_similar_items(items, k, verbose, get_all_items)