Does anyone have some example code for building a reconnecting PB client?

This is what I have now:

from twisted.spread import pb
    from twisted.internet import reactor
    from twisted.python import util
   
    events = pb.PBClientFactory()
    reactor.connectTCP("localhost", 8789, events)
    queue = events.getRootObject()