<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _compute_magnitude_squared_term(self, P, M, Q, W, mag):
 """ Compute magnitude squared term, equation 5, p. 909. """

        return P * (mag - M) + Q * (mag - M) ** 2 + W