Removes the items which are not contained in the specified collection. In other words, only the items that
        are contained in the specified collection will be retained.

        :param items: (Collection), collection which includes the elements to be retained in this set.
        :return: (bool), ``true`` if this queue changed as a result of the call.

def retain_all(self, items):
        """
        Removes the items which are not contained in the specified collection. In other words, only the items that
        are contained in the specified collection will be retained.

        :param items: (Collection), collection which includes the elements to be retained in this set.
        :return: (bool), ``true`` if this queue changed as a result of the call.
        """
        check_not_none(items, "Value can't be None")
        data_items = []
        for item in items:
            check_not_none(item, "Value can't be None")
            data_items.append(self._to_data(item))
        return self._encode_invoke(queue_compare_and_retain_all_codec, data_list=data_items)