Implement a function to compute the Temporal Difference (TD) error for a single state transition in reinforcement learning.
The TD error measures how much the current value estimate differs from a better estimate that incorporates the immediate reward and the bootstrapped value of the next state.
Given:
v_s: The current estimate of the value for state sreward: The immediate reward received after transitioning from state sv_s_prime: The current estimate of the value for the next state s'gamma: The discount factor (between 0 and 1)done: A boolean indicating if the next state is terminalReturn the TD error as a float. Note that when the episode terminates (done=True), there is no future value to bootstrap from since the episode ends.
Only use NumPy.