def METHOD_NAME(instance, extra_data={}):
    result = {
        "task": service.extract_task_info(instance),
        "project": service.extract_project_info(instance.project),
    }
    if instance.user_story:
        result["task"]["userstory"] = service.extract_userstory_info(instance.user_story)
    result.update(extra_data)
    return result