def METHOD_NAME(state):
    res = {}
    for t in marathon_tasks(state):
        if t["state"] == "TASK_RUNNING":
            task_id = t["name"][: t["name"].find(".", t["name"].find(".") + 1)]
            gitsha = t["name"][len(task_id) + 1 : t["name"].find(".", len(task_id) + 1)]
            res.setdefault(task_id, {}).setdefault(gitsha, []).append(t)
    return res