def to_internal_value(self, data):
        if data is None:
            return None
        try:
            return next(
                user for user in
                self.get_queryset()
                if user._id == data
            )
        except __HOLE__:
            self.fail('invalid_data')
dataset/ETHPy150Open CenterForOpenScience/osf.io/api/files/serializers.py/CheckoutField.to_internal_value