Let \( f(z) = \frac{z^2 + 1}{z-1} \), where \( z \) is a complex number such that \( |z| = 2 \). Determine the magnitude of \( f(z) \). Let's think step by step and output the final answer within \boxed{}.
user