def METHOD_NAME(self, node, value):
    if node in self.three_hop_dict_label:
        self.three_hop_dict_label[node].append(value)
    else:
        self.three_hop_dict_label[node] = [value]
    hashed_part_idx = self.entity2idx[node]
    if hashed_part_idx in self.three_hop_dict_index:
        self.three_hop_dict_index[hashed_part_idx].append(self.entity2idx[value])
    else:
        self.three_hop_dict_index[hashed_part_idx] = [self.entity2idx[value]]