A function is supposed to completely reset a user's profile dictionary to default values. But after calling the function, the original dictionary remains totally unchanged.
Python passes references to objects by value — the reference itself is copied. Reassigning the parameter name inside the function only points that LOCAL name to a new dict; it does not affect the object the caller's variable still points to. To actually reset it, you must mutate the existing dict's keys.