def get_batch_asset_task_info(ctx):
    """Parses context data from webpublisher's batch metadata

        Returns:
            (tuple): asset, task_name (Optional), task_type
    """
    task_type = "default_task_type"
    task_name = None
    asset = None

    if ctx["type"] == "task":
        items = ctx["path"].split('/')
        asset = items[-2]
        task_name = ctx["name"]
        task_type = ctx["attributes"]["type"]
    else:
        asset = ctx["name"]

    return asset, task_name, task_type