<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clientDisconnected(self, proto):
 """ Called when a client disconnects from the bus """

        for rule_id in proto.matchRules:
            self.router.delMatch(rule_id)

        for busName in proto.busNames.keys():
            self.dbus_ReleaseName(busName, proto.uniqueName)

        if proto.uniqueName:
            del self.clients[proto.uniqueName]