<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def try_put(self, key, value, timeout=0):
 """ Tries to put the given key and value into this map and returns immediately if timeout is not provided. If timeout is provided, operation waits until it is completed or timeout is reached. :param key: (object), key of the entry. :param value: (object), value of the entry. :param timeout: (int), operation timeout in seconds (optional). :return: (bool), ``true`` if the put is successful, ``false`` otherwise. """

        check_not_none(key, "key can't be None")
        check_not_none(value, "value can't be None")

        key_data = self._to_data(key)
        value_data = self._to_data(value)

        return self._try_put_internal(key_data, value_data, timeout)