<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_tickets(self, open_status=True, closed_status=True):
 """List all tickets. :param boolean open_status: include open tickets :param boolean closed_status: include closed tickets """

        mask = """mask[id, title, assignedUser[firstName, lastName], priority,
                  createDate, lastEditDate, accountId, status, updateCount]"""

        call = 'getTickets'
        if not all([open_status, closed_status]):
            if open_status:
                call = 'getOpenTickets'
            elif closed_status:
                call = 'getClosedTickets'
            else:
                raise ValueError("open_status and closed_status cannot both be False")

        return self.client.call('Account', call, mask=mask, iter=True)