<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def max_n(self):
 """Returns the maximum index of Pauli matrices in the Term."""

        return max(term.max_n() for term in self.terms if term.ops)