<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list(self, toa=None, show_history=False):
 """Return all revisions for this stack :param int toa: The time of action as a UTC timestamp :param bool show_history: Whether to show historical revisions """

        if not toa:
            toa = time.mktime(datetime.datetime.now().timetuple())

        query = {
            "$query": {
                "master_id": self.master_id,
                "processed": show_history,
                "toa" : {"$lte" : toa}
            },
            "$orderby": {
                "toa": 1
            }
        }

        revisions = yield self.revisions.find(query)

        raise Return(revisions)