code: def assimilate(self, path):
          
          try:
              d = self.get_task_doc(path)
              if self.mapi_key is not None and d["state"] == "successful":
                  self.calculate_stability(d)
              tid = self._insert_doc(d)
              return tid
          except Exception as ex:
              import traceback
              logger.error(traceback.format_exc())
              return False
docs: Parses vasp runs. Then insert the result into the db. and return the
          task_id or doc of the insertion.
  
          Returns:
              If in simulate_mode, the entire doc is returned for debugging
              purposes. Else, only the task_id of the inserted doc is returned.