def get_service_from_cdh(self, name):
        cluster = self.cdhApi.get_all_clusters()[0]
        try:
            return next(service for service in cluster.get_all_services() if service.type == name)
        except __HOLE__:
            raise NoCdhServiceError('No {} in CDH services.'.format(name))

    # get host ip for service or specified service role
dataset/ETHPy150Open trustedanalytics/platform-appstack/env_vars_fetcher/cdh_utilities.py/CdhApiHelper.get_service_from_cdh