@glacier_connect
    @sns_connect
    def sns_list_subscriptions(self, protocol, endpoint, topic, sns_options):
        subscriptions = self.sns_conn.get_all_subscriptions()['ListSubscriptionsResponse']['ListSubscriptionsResult']['Subscriptions']

        results = []
        for sub in subscriptions:
            try:
                import collections
                result = collections.OrderedDict()
            except __HOLE__:
                result = dict()

            subtopic = sub['TopicArn'].split(":")[-1]
            subprotocol = sub['Protocol']
            subendpoint = sub['Endpoint']
            subarn = sub['SubscriptionArn']

            if topic and subtopic != topic:
                continue
            if protocol and subprotocol != protocol:
                continue
            if endpoint and subendpoint != endpoint:
                continue

            result['Account #'] = sub['Owner']
            result['Section'] = subtopic
            result['Protocol'] = subprotocol
            result['Endpoint'] = subendpoint
            result['ARN'] = subarn
            results += [result]
        return results
dataset/ETHPy150Open uskudnik/amazon-glacier-cmd-interface/glacier/GlacierWrapper.py/GlacierWrapper.sns_list_subscriptions