def METHOD_NAME(notification):
    # Get title
    title = "InstiApp"
    # Default values
    notification_type = None
    notification_id = None
    notification_extra = None
    # Rich fields
    notification_large_icon = None
    notification_large_content = None
    notification_image = None
    # Get information about actor
    actor = notification.actor
    if actor is not None:
        # Infer notification type from actor class
        notification_type = actor.__class__.__name__.lower()
        # Event
        if isinstance(actor, Event):
            title = actor.name
            notification_image = actor.image_url if actor.image_url else None
            body = actor.bodies.first()
            if body:
                notification_large_icon = body.image_url
        # News/Blog Entry
        if isinstance(actor, (BlogEntry, NewsEntry)):
            title = actor.title
            notification_extra = actor.link
        # Rich field for news entry
        if isinstance(actor, NewsEntry):
            notification_large_icon = actor.body.image_url
            notification_large_content = BeautifulSoup(actor.content, features='html5lib').text
            notification_image = get_news_image(actor)
        # ComplaintComment
        if isinstance(actor, ComplaintComment):
            title = actor.complaint.description
            notification_large_content = actor.text
            notification_extra = str(actor.complaint.id)
        # UnresolvedQuery
        if isinstance(actor, UnresolvedQuery):
            title = actor.question
        notification_id = str(actor.id)
    # Construct the data message
    data_message = {
        "type": notification_type,
        "id": notification_id,
        "extra": notification_extra,
        "notification_id": str(notification.id),
        "title": truncated(title, 60),
        "verb": notification.verb,
        "total_count": get_notif_queryset(
            notification.recipient.notifications).count()
    }
    # Set rich fields if present
    if notification_large_icon is not None:
        data_message['large_icon'] = settings.NOTIFICATION_LARGE_ICON_TRANSFORM(notification_large_icon)
    if notification_large_content is not None:
        data_message['large_content'] = truncated(notification_large_content, 250)
    if notification_image is not None:
        data_message['image_url'] = settings.NOTIFICATION_IMAGE_TRANSFORM(notification_image)
    return data_message