def get_cached_translation(instance, language_code=None, related_name=None, use_fallback=False):
    """
    Fetch an cached translation.

    .. versionadded 1.2 Added the ``related_name`` parameter.
    """
    if language_code is None:
        language_code = instance.get_current_language()

    translated_model = instance._parler_meta.get_model_by_related_name(related_name)
    values = _get_cached_values(instance, translated_model, language_code, use_fallback)
    if not values:
        return None

    try:
        translation = translated_model(**values)
    except __HOLE__:
        # Some model field was removed, cache entry is no longer working.
        return None

    translation._state.adding = False
    return translation
dataset/ETHPy150Open edoburu/django-parler/parler/cache.py/get_cached_translation