<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pnl_search(self, asset_manager_id, pnl_type, business_date, **kwargs):
 """ Search pnl records. Args: asset_manager_id (int):
 id of asset manager owning the pnl records pnl_type (str):
 either "Position" or "Transaction business_date (date):
 date of the pnl records to return book_ids (list):
 book id filter on pnl records asset_ids (list):
 asset id filter on pnl records transaction_ids (list):
 transactino id filter on pnl records next_hash_key (str):
 continuation hash key for paging the results next_range_key (str):
 continuation range key for paging the results page_size (int):
 the number of results to return """

        self.logger.info('Retrieving Pnls - Asset Manager: %s - Business Date: %s' % \
                        (asset_manager_id, business_date))
        url = '%s/pnls/%s' % (self.endpoint, asset_manager_id)
        search_params = {'pnl_type': pnl_type,
                         'business_date': business_date.isoformat()}

        for param_key, param_val in kwargs.items():
            if not param_val:
                continue
            search_params[param_key] = ','.join(param_val) if isinstance(param_val, list) else param_val

        response = self.session.get(url, params=search_params)
        if response.ok:
            json_body = response.json()
            results = json_body.get('items')
            next_hash_key = json_body.get('next_hash_key')
            next_range_key = json_body.get('next_range_key')
            pnls = [json_to_pnl(pnl_json) for pnl_json in results]
            self.logger.info('Retrieved %s Pnl records.', len(pnls))
            return next_hash_key, next_range_key, pnls
        else:
            self.logger.error(response.text)
            response.raise_for_status()