def METHOD_NAME(data):
    trap_object = build_tuple(data['trap-oid'])
    notification = NotificationType(ObjectIdentity(*trap_object))
    credentials = get_credentials(data)
    try:
        instance_index = data['instance-index']
        notification._NotificationType__instanceIndex += (instance_index,)
    except KeyError:
        pass
    try: 
        varbinds = data['trap-varbinds']
        for varbind in varbinds:
            obj = build_tuple(varbind['oid'])
            notification._NotificationType__objects[obj] = varbind['value']
    except KeyError:
        pass
    return sendNotification(SnmpEngine(),
                            credentials,
                            UdpTransportTarget((data['dest'], 162)),
                            ContextData(),
                            'trap',
                            notification
    )