'Obtains Collins assets matching the provided attributes.'

def find_assets(self, attributes={}, operation='AND'):

    attributes_query = ['='.join(attr_pair) for attr_pair in iteritems(attributes)]
    query_parameters = {'details': ['True'], 'operation': [operation], 'query': attributes_query, 'remoteLookup': [str(self.query_remote_dcs)], 'size': [self.results_per_query], 'type': [self.collins_asset_type]}
    assets = []
    cur_page = 0
    num_retries = 0
    while True:
        if (num_retries == self.collins_max_retries):
            raise MaxRetriesError(('Maximum    of    %s    retries    reached;    giving    up' % self.collins_max_retries))
        query_parameters['page'] = cur_page
        query_url = ('%s?%s' % ((CollinsDefaults.ASSETS_API_ENDPOINT % self.collins_host), urlencode(query_parameters, doseq=True)))
        try:
            response = open_url(query_url, timeout=self.collins_timeout_secs, url_username=self.collins_username, url_password=self.collins_password, force_basic_auth=True)
            json_response = json.loads(response.read())
            assets += json_response['data']['Data']
            if (len(json_response['data']['Data']) == 0):
                break
            cur_page += 1
            num_retries = 0
        except:
            self.log.error(('Error    while    communicating    with    Collins,    retrying:\n%s' % traceback.format_exc()))
            num_retries += 1
    return assets
