<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_for_errors(etree: ET.ElementTree):
 """Check AniDB response XML tree for errors."""

    if etree.getroot().tag == 'error':
        raise APIError(etree.getroot().text)