<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getRequest(self, id_):
 """ Gets a request based on the id. :raise LookupError: Request not found. """

        for request in self.requests:
            if request.id == id_:
                return request

        raise LookupError("Request %r not found" % (id_,))