code: def save_record(self, agent_id, t_step, key, value):
          '''
          Save a collection of records to the database.
          Database writes are cached.
          '''
          value = self.convert(key, value)
          self._tups.append(Record(agent_id=agent_id,
                                   t_step=t_step,
                                   key=key,
                                   value=value))
          if len(self._tups) > 100:
              self.flush_cache(f save_record(self, agent_id, t_step, key, value):
          '''
          Save a collection of records to the database.
          Database writes are cached.
          '''
          value = self.convert(key, value)
          self._tups.append(Record(agent_id=agent_id,
                                   t_step=t_step,
                                   key=key,
                                   value=value))
          if len(self._tups) > 100:
              self.flush_cache()
docs: Save a collection of records to the database.
          Database writes are cached.