<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def search_first(self, *criterion, **kwargs):
 """ Returns the first match based on criteria or None. """

        query = self._query(*criterion)
        query = self._order_by(query, **kwargs)
        query = self._filter(query, **kwargs)
        # NB: pagination must go last
        query = self._paginate(query, **kwargs)
        return query.first()