<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_by_domain(self, domain):
 """ Apply the given domain to a copy of this query """

        query = self._copy()
        query.domain = domain
        return query