import six


def find_only(element, tag):
    """Return the only subelement with tag(s)."""
    if isinstance(tag, six.string_types):
        tag = [tag]
    found = []
    for t in tag:
        found.extend(element.findall(t))
    assert len(found) == 1, 'expected one <%s>, got %d' % (tag, len(found))
    return found[0]