def METHOD_NAME(self, mat):
    mat_doc = self.materials.query_one(
        {self.materials.key: mat},
        [self.materials.key, "origins", "last_updated", "structure", "deprecated"],
    )
    for origin in mat_doc["origins"]:
        if origin["name"] == "structure":
            task_id = origin["task_id"]
    task_query = self.tasks.query_one(
        properties=["last_updated", "calcs_reversed"],
        criteria={self.tasks.key: task_id},
    )
    task_updated = task_query["last_updated"]
    total_magnetization = task_query["calcs_reversed"][-1]["output"]["outcar"][
        "total_magnetization"
    ]
    mat_doc.update(
        {
            "task_id": task_id,
            "total_magnetization": total_magnetization,
            "task_updated": task_updated,
            self.materials.key: mat_doc[self.materials.key],
        }
    )
    return mat_doc