<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_keepalive(self, interval):
 """ Set a keepalive to occur every ``interval`` on this connection. """

        pinger = functools.partial(self.ping, 'keep-alive')
        self.reactor.scheduler.execute_every(period=interval, func=pinger)