def METHOD_NAME(domain_link):
    if domain_link.is_remote:
        return get_latest_released_versions_by_app_id(domain_link)
    else:
        return get_latest_released_app_versions_by_app_id(domain_link.master_domain)