def METHOD_NAME(self, cursor, timeout):
    # PG8000 needs a literal embedded in the string; prepared
    # statements can't be SET with a variable.
    cursor.execute('SET lock_timeout = %s', (timeout,))