<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def all(cls, domain=None):
 """ Return all sites @param domain: The domain to filter by @type domain: Domain @rtype: list of Site """

        Site = cls
        site = Session.query(Site)
        if domain:
            site.filter(Site.domain == domain)
        return site.all()