def approximate_pi(n_terms): """ Approximate pi using the Leibniz series. """ # Write your code here pass