<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def bulk_save(self, action_list, **kwargs):
        ''' sends a passed in action_list to elasticsearch '''

        lg = logging.getLogger("%s.%s" % (self.ln, inspect.stack()[0][3]))
        lg.setLevel(self.log_level)
        err_log = logging.getLogger("index.errors")
        es = self.es
        es_index = get2(kwargs, "es_index", self.es_index)
        reset_index = kwargs.get("reset_index",self.reset_index)
        doc_type = kwargs.get("doc_type", self.doc_type)

        lg.info("Sending %s items to Elasticsearch",len(action_list))
        # bulk_stream = helpers.streaming_bulk(es,
        result = helpers.bulk(es,
                              action_list,
                              chunk_size=400,
                              raise_on_error=False)
        lg.info("FINISHED sending to Elasticsearch")
        if result[1]:
            lg.info("Formating Error results")
            # action_keys = {item['_id']:i for i, item in enumerate(action_list)}
            new_result = []
            for item in result[1][:5]:
                for action_item in action_list:
                    if action_item['_id'] == item[list(item)[0]]['_id']:
                        new_result.append((item, action_item,))
                        break
            err_log.info("Results for batch '%s'\n(%s,\n%s\n%s)",
                         kwargs.get('batch', "No Batch Number provided"),
                         result[0],
                         json.dumps(new_result, indent=4),
                         json.dumps(result[1]))
            del new_result
            lg.info("Finished Error logging")
        # for success, result in bulk_stream:
        #     lg.debug("\nsuccess: %s \nresult:\n%s", success, pp.pformat(result))
        return result