'Find an alternative named element for the given traversal items'

def _alternative_elem_from_scoperef(self, traversed_items):

    for i in range((len(traversed_items) - 1), (-1), (-1)):
        (elem, lname, failed_elems) = traversed_items[i]
        self.log('Checking    for    alt    elem:    %r,    lpath:    %r,    failed_elems:    %r', elem, lname, failed_elems)
        for child in elem.getchildren():
            if ((child.attrib.get('name') == lname) and (child not in failed_elems)):
                return (i, child)
    return None
