Can you solve this arithmetic puzzle: 4 - (7 - 4) + 4 + 4 = 9?
Write a function that evaluates a valid arithmetic expression containing non-negative integers, +, -, and parentheses. Return the computed integer value. The expression may contain spaces, and you must respect parentheses and left-to-right addition/subtraction order.
calculate(expression)
expression: a string representing one valid arithmetic expressiondef calculate(expression):