text: from stix_shifter_utils.modules.base.stix_transmission.base_results_connector import BaseResultsConnector
  from stix_shifter_utils.utils.error_response import ErrorResponder
  import json
  
  class MaaS360ResultsConnector(BaseResultsConnector):
      def __init__(self, api_client):
          self.api_client = api_client
  
      def create_results_connection(self, search_id, offset, length):
          try:
              min_range = offset
              max_range = offset + length
              response = self.api_client.get_search_results(search_id, int(min_range), int(max_range))
              response_code = response.code
              response_txt = response.read().decode('utf-8')
              response_dict = json.loads(response_txt)
  
              # Construct a response object
              return_obj = dict()
              if response_code == 200:
                  return_obj['success'] = True
                  return_obj['data'] = response_dict['data']
              else:
                  ErrorResponder.fill_error(return_obj, response_dict, ['message'])
              return return_obj
          except Exception as err:
              print('error when getting search results: {}'.format(err))
              raise
  