Implement a curried sum function like sum(2)(3) that returns the result.
The function should return a closure when called with one argument, while also supporting direct evaluation as sum(a, b) for standard automated testing. Inputs are numeric, and the result must be their sum.
a and b are integers or floating-point numbersa and the second call supplies bdef sum(a, b=None):