<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def order(self):
 """ Finds the polynomial order. Examples -------- 1 18 0 Traceback (most recent call last):
 AttributeError: Power needs to be positive integers """

    if not self.is_polynomial():
      raise AttributeError("Power needs to be positive integers")
    return max(key for key in self._data) if self._data else 0