code: def add(
      self, keys, values, additional_data=None, force_rebuild_tree=False
  ):
      if not additional_data:
          additional_data = [None] * len(keys)
  
      # Adds new embeddings and values to the dictionary
      indices = []
      indices_to_remove = []
      for i in range(keys.shape[0]):
          index = self._lookup_key_index(keys[i])
          if index and self.override_existing_keys:
              # update existing value
              self.values[index] += self.new_value_shift_coefficient * (
                  values[i] - self.values[index]
              )
              self.additional_data[index[0][0]] = additional_data[i]
              self.lru_timestamps[index] = self.current_timestamp
              indices_to_remove.append(i)
          else:
              # add new
              if self.curr_size >= self.max_size:
                  # find the LRU entry
                  index = np.argmin(self.lru_timestamps)
              else:
                  index = self.curr_size
                  self.curr_size += 1
              self.lru_timestamps[index] = self.current_timestamp
              indices.append(index)
  
      for i in reversed(indices_to_remove):
          keys = np.delete(keys, i, 0)
          values = np.delete(values, i, 0)
          del additional_data[i]
  
      self.buffered_keys = np.vstack((self.buffered_keys, keys))
      self.buffered_values = np.vstack((self.buffered_values, values))
      self.buffered_indices = self.buffered_indices + indices
      self.buffered_additional_data = (
          self.buffered_additional_data + additional_data
      )
  
      if len(self.buffered_indices) >= self.min_update_size:
          self.min_update_size = max(
              self.initial_update_size, int(self.curr_size * 0.02)
          )
          self._rebuild_index()
      elif force_rebuild_tree or self.rebuild_on_every_update:
          self._rebuild_index()
  
      self.current_timestamp += 1
  
imports: import os
  import pickle
  import numpy
label_desc: Use image node_id 2 for calling the AnnoyDictionary obj's underlying member method code with example usage: obj.add(keys, values, additional_data, force_rebuild_tree) without return types