<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ensure_permission_set_tree_cached(user):
 """ Helper to cache permission set tree on user instance """

    if hasattr(user, CACHED_PSET_PROPERTY_KEY):
        return
    try:
        setattr(
            user, CACHED_PSET_PROPERTY_KEY, _get_permission_set_tree(user))
    except ObjectDoesNotExist:  # No permission set
        pass