def METHOD_NAME(td):
    result = ""
    if td.a and td.a.img:
        result = td.a.img.get("title", td.a.get_text(strip=True))
    if not result:
        result = td.get_text(strip=True)
    return result