@property
def challenge(cls):
    """
        Retrieve and cache the related challenge.

        :return: The challenge that is related to this device
        :rtype: type of rest_multi_factor.models.mixins.ChallengeMixin
        """
    if hasattr(cls, '_challenge'):
        return getattr(cls, '_challenge')
    relations = getattr(cls, '_meta').related_objects
    challenge = cls._get_challenge(relations)
    setattr(cls, '_challenge', challenge)
    return challenge
