code: def get_buffer(self):
          
  
          # Get sources for documents which are in Elasticsearch
          # and they are not in local buffer
          if self.doc_to_update:
              self.update_sources()
  
          ES_buffer = self.action_buffer
          self.clean_up()
          return ES_buffer
docs: Get buffer which needs to be bulked to elasticsearch