def _element_identification_string(element):
    """
    Gets a string that will hopefully help in identifing an element when there
    is an error.
    """
    info_string = "tag: {}".format(element.tag)
    try:
        elem_id = element.attrib["id"]
        info_string += " id: {}".format(elem_id)
    except KeyError:
        pass

    return info_string