<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def interface_errors(self):
 """ Parse 'show interfaces extensive' and return interfaces with errors. Purpose: This function is called for the -e flag. It will let the user | know if there are any interfaces with errors, and what those | interfaces are. @returns: The output that should be shown to the user. @rtype: str """

        output = []  # used to store the list of interfaces with errors.
        # get a string of each physical and logical interface element
        dev_response = self._session.command('sh interfaces extensive')
        ints = dev_response.xpath('//physical-interface')
        ints += dev_response.xpath('//logical-interface')
        for i in ints:
            # Grab the interface name for user output.
            int_name = i.xpath('name')[0].text.strip()
            # Only check certain interface types.
            if (('ge' or 'fe' or 'ae' or 'xe' or 'so' or 'et' or 'vlan' or
                 'lo0' or 'irb') in int_name):
                try:
                    status = (i.xpath('admin-status')[0].text.strip() +
                              '/' + i.xpath('oper-status')[0].text.strip())
                except IndexError:
                    pass
                else:
                    for error in self._error_parse(i, "input"):
                        output.append("%s (%s)%s" % (int_name, status,
                                                     error))
                    for error in self._error_parse(i, "output"):
                        output.append("%s (%s)%s" % (int_name, status,
                                                     error))
        if output == []:
            output.append('No interface errors were detected on this device.')
        return '\n'.join(output) + '\n'