def encode_message(message_template, objects):
    if objects is None:
        return message_template
    if isinstance(objects, list) or isinstance(objects, tuple):
        return tuple(encode_object(obj) for obj in objects) % message_template
    if type(objects) is dict:
        return message_template % dict((name, encode_object(obj, name)) for name, obj in objects.iteritems())
    return ""
dataset/ETHPy150Open brosner/django-notification/notification/message.py/encode_message/swapped operands of `%`