<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, service_type=None, organisation_id=None, include_deactivated=False):
 """ Get all resources :param service_type: Filter by service type :param organisation_id: Filter by organisation id :param include_deactivated: Flag to include deactivated Services :returns: list of Resource instances :raises: SocketError, CouchException """

        if include_deactivated:
            resources = yield views.services.get(key=[service_type, organisation_id])
        else:
            resources = yield views.active_services.get(key=[service_type, organisation_id])

        # TODO: shouldn't this include the doc as the parent?
        raise Return([cls(**resource['value']) for resource in resources['rows']])