return computed_val2
return f2
if __name__ == '__main__':
    partial_map = {'factor1': 1, 'factor2': 2}
func = f1(partial_map)
remaining_map1 = {'factor3': 3}
answer1A = func(remaining_map1)
print('Answer after using partial and remaining maps = ', answer1A)
partial_map['factor3'] = 3
answer1B = func(partial_map)
print('Answer with completed map to same func = ', answer1B)
remaining_map2 = {'factor3': 15}
answer2 = func(remaining_map2)
print('Answer with different second map = ', answer2)
Belief Propagation Implementation