<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_by_id_or_404(self, id, **kwargs):
 """Gets by a instance instance r raises a 404 is one isn't found."""

        obj = self.get_by_id(id=id, **kwargs)

        if obj:
            return obj

        raise Http404