<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_all(cls, account_id=None, location=None):
 """ Return all Enforcements args: `account_id` : Unique Account Identifier `location` : Region associated with the Resource returns: list of enforcement objects """

        qry = db.Enforcements.filter()

        if account_id:
            qry = qry.filter(account_id == Enforcements.account_id)

        if location:
            qry = qry.join(Resource, Resource.location == location)

        return qry