<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def key_set(self, predicate=None):
 """ Returns a List clone of the keys contained in this map or the keys of the entries filtered with the predicate if provided. **Warning: The list is NOT backed by the map, so changes to the map are NOT reflected in the list, and vice-versa.** :param predicate: (Predicate), predicate to filter the entries (optional). :return: (Sequence), a list of the clone of the keys. .. seealso:: :class:`~hazelcast.serialization.predicate.Predicate` for more info about predicates. """

        if predicate:
            predicate_data = self._to_data(predicate)
            return self._encode_invoke(map_key_set_with_predicate_codec, predicate=predicate_data)
        else:
            return self._encode_invoke(map_key_set_codec)