'Sets policies for all backends'

def _set_backend_policies(self):

    ensure_proxy_protocol = False
    replace = []
    backend_policies = self._get_backend_policies()
    for listener in self.listeners:
        want = False
        if (('proxy_protocol' in listener) and listener['proxy_protocol']):
            ensure_proxy_protocol = True
            want = True
        if ((str(listener['instance_port']) + ':ProxyProtocol-policy') in backend_policies):
            if (not want):
                replace.append({'port': listener['instance_port'], 'policies': []})
        elif want:
            replace.append({'port': listener['instance_port'], 'policies': ['ProxyProtocol-policy']})
    if ensure_proxy_protocol:
        self._set_proxy_protocol_policy()
    for item in replace:
        self.elb_conn.set_lb_policies_of_backend_server(self.elb.name, item['port'], item['policies'])
        self.changed = True
