<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_rules_from_all_proxies(self):
 """ Clear fault injection rules from all known service proxies. """

        self._queue = []        
        if self.debug:
            print 'Clearing rules'
        for service in self.app.get_services():
            for instance in self.app.get_service_instances(service):
                if self.debug:
                    print 'Clearing rules for %s - instance %s' % (service, instance)
                resp = requests.delete("http://{}/gremlin/v1/rules".format(instance))
                if resp.status_code != 200:
                    print 'Failed to clear rules for %s - instance %s' % (service, instance)