[python] Python update a key in dict if it doesn't exist