def cache_request_user(user_cls, request, user_id):
    pk_field = user_cls.pk_field()
    user = getattr(request, '_user', None)
    if user is None or getattr(user, pk_field, None) != user_id:
        request._user = user_cls.get_item(**{pk_field: user_id})
deep copy
dataset/ETHPy150Open ramses-tech/nefertari/nefertari/authentication/models.py/cache_request_user--crossover with--dataset/ETHPy150Open uwescience/raco/raco/algebra.py/UnaryOperator.copy