def periodic_service_rpcs(self):
        """Check if any RPC has expired and remove it from the in flight list.

        This function should be called periodically to expire any RPCs that never complete.
        """

        to_remove = []

        now = monotonic()
        for rpc_tag, rpc in self.in_flight_rpcs.items():
            expiry = rpc.sent_timestamp + rpc.timeout
            if now > expiry:
                to_remove.append(rpc_tag)

        for tag in to_remove:
            del self.in_flight_rpcs[tag]
Check if any RPC has expired and remove it from the in flight list.

        This function should be called periodically to expire any RPCs that never complete.