def renew_lock(self):
self._can_run()<EOL>expiry = self._mgmt_request_response(<EOL>REQUEST_RESPONSE_RENEW_SESSION_LOCK_OPERATION,<EOL>{'<STR_LIT>': self.session_id},<EOL>mgmt_handlers.default)<EOL>self.locked_until = datetime.datetime.fromtimestamp(expiry[b'<STR_LIT>']/<NUM_LIT>)<EOL>
Renew the session lock.

        This operation must be performed periodically in order to retain a lock on the
        session to continue message processing.
        Once the lock is lost the connection will be closed. This operation can
        also be performed as a threaded background task by registering the session
        with an `azure.servicebus.AutoLockRenew` instance.

        Example:
            .. literalinclude:: ../examples/test_examples.py
                :start-after: [START renew_lock]
                :end-before: [END renew_lock]
                :language: python
                :dedent: 4
                :caption: Renew the session lock before it expires