def retain_all(self, items):
check_not_none(items, "<STR_LIT>")<EOL>data_items = []<EOL>for item in items:<EOL><INDENT>check_not_none(item, "<STR_LIT>")<EOL>data_items.append(self._to_data(item))<EOL><DEDENT>return self._encode_invoke(set_compare_and_retain_all_codec, values=data_items)<EOL>
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 set changed as a result of the call.