def _get_listener_policies(self, operation, elb):
        response_data = self.wrap_aws_rate_limited_call(operation, LoadBalancerName=elb.name)
        policies = {}
        for policy in response_data.get('PolicyDescriptions', []):
            p = {"name": policy['PolicyName'], "type": policy['PolicyTypeName'], "Attributes": {}}
            for attribute in policy['PolicyAttributeDescriptions']:
                if attribute['AttributeValue'] == "true":
                    p['Attributes'][attribute['AttributeName']] = True
                elif attribute['AttributeValue'] == "false":
                    p['Attributes'][attribute['AttributeName']] = False
                else:
                    p['Attributes'][attribute['AttributeName']] = attribute['AttributeValue']

            # This next bit may overwrite anything you did in the above for-loop:
            if "Reference-Security-Policy" in p['Attributes']:
                p['reference_security_policy'] = p['Attributes']['Reference-Security-Policy']
                del p['Attributes']
            else:
                p = parse_policy(p)

            policies[policy['PolicyName']] = p

        return policies
dataset/ETHPy150Open Netflix/security_monkey/security_monkey/watchers/elb.py/ELB._get_listener_policies/original