code: def get_service_enabled(self, name, accounts_list=None, search_filter=None, region=None):
          
          if not accounts_list:
              accounts = self.get_all(search_filter=search_filter)
          else:
              accounts = accounts_list
  
          if self.version == 1:
              accounts = accounts['accounts']
  
          enabled = []
          for account in accounts:
              if self.version == 1:
                  account_filter = "accounts[?id=='{id}']".format(id=account['id'])
              else:
                  account_filter = "[?id=='{id}']".format(id=account['id'])
  
              service = self.get_service(name, search_filter=account_filter)
  
              if self.version == 1:
                  if service:
                      service = service['enabled']  # no region information available in v1
              else:
                  if not region:
                      service_filter = "status[?enabled]"
                  else:
                      service_filter = "status[?(region=='{region}' || region=='all') && enabled]".format(region=region)
  
                  service = jmespath.search(service_filter, service)
  
              if service:
                  enabled.append(account)
  
          return enabled
docs: Get a list of accounts where a service has been enabled.