def psetex(self, name, time_ms, value):
        """
        Set the value of key ``name`` to ``value`` that expires in ``time_ms``
        milliseconds. ``time_ms`` can be represented by an integer or a Python
        timedelta object
        """
        if isinstance(time_ms, datetime.timedelta):
            time_ms = int(time_ms.total_seconds() * 1000)
        return self.execute_command('PSETEX', name, time_ms, value)
def psetex ( self , name , time_ms , value ) : if isinstance ( time_ms , datetime . timedelta ) : time_ms = int ( time_ms . total_seconds ( ) * 1000 ) return self . execute_command ( 'PSETEX' , name , time_ms , value )
Set the value of key ``name`` to ``value`` that expires in ``time_ms``
        milliseconds. ``time_ms`` can be represented by an integer or a Python
        timedelta object