def METHOD_NAME(self):
    # DONE: load the dictionary if there is any
    if os.path.exists(self.three_hop_dict_label_path):
        loaded_dict = json.loads(open(self.three_hop_dict_label_path).read())
    else:
        loaded_dict = {}
    # DONE: update the loaded dict with current data
    loaded_dict.update(self.three_hop_dict_label)
    # DONE: write the updated dict to the file
    with open(self.three_hop_dict_label_path, 'w') as f:
        f.write(json.dumps(loaded_dict))
        f.close()
    self.three_hop_dict_label = {}