<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def atan_mgl(x, n=10):
 """ Finds the arctan using the Madhava-Gregory-Leibniz series. """

  acc = 1 / (1 - z ** -1) # Accumulator filter
  return acc(mgl_seq(x)).skip(n-1).take()