def attribute():
    return {'first_name': None, 'last_name': None, 'calls': 0}
accounts = defaultdict(attribute)
accounts[1]['calls'] = accounts[1]['calls'] + 1
accounts[2]['calls'] = accounts[2]['calls'] + 1
Python - how to pass a dictionary into defaultdict as value and not as a reference