Given a piece of extremely poorly written code, refactor it and debug it.
Asked in the onsite debugging round stage. Your task is to replace the broken implementation with a clean, correct one.
def normalize_and_sum(nums):
def normalize_and_sum(nums):