<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setex(self, key, seconds, value):
 """Set the value and expiration of a key. If seconds is float it will be multiplied by 1000 coerced to int and passed to `psetex` method. :raises TypeError: if seconds is neither int nor float """

        if isinstance(seconds, float):
            return self.psetex(key, int(seconds * 1000), value)
        if not isinstance(seconds, int):
            raise TypeError("milliseconds argument must be int")
        fut = self.execute(b'SETEX', key, seconds, value)
        return wait_ok(fut)