<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def where(self, *custom_restrictions, **restrictions):
 """ Restricts the records to the query subject to the passed +restrictions+. Analog to "WHERE" in SQL. Can pass multiple restrictions, and can invoke this method multiple times per query. """

        for attr, value in restrictions.items():
            self.where_query[attr] = value
        if custom_restrictions:
            self.custom_where.append(tuple(custom_restrictions))
        return self