def string_to_sign(data):
    """ Build a signed SNS string from a dict """
    strings = []
    for key in ('Message', 'MessageId', 'Subject', 'SubscribeURL', 'Timestamp',
                'Token', 'TopicArn', 'Type'):
        if key in data:
            strings += [key, data[key]]
    strings.append("")
    return '\n'.join(strings).encode('utf8')
dataset/ETHPy150Open orcasgit/python-misfit/misfit/notification.py/string_to_sign/original