<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def first_or_fail(self, columns=None):
 """ Execute the query and get the first result or raise an exception. :type columns: list :raises: ModelNotFound """

        model = self.first(columns)
        if model is not None:
            return model

        raise ModelNotFound(self._parent.__class__)