def METHOD_NAME(self, target_dir):
    '''
    Writes archive entries of the perovskite database
    :param target_dir: path pointing to where to dump the ``archive.json`` files
    '''
    self.sections, self.quantities_list = self.collect_schema_items()
    def create_rec_dd():  # To create an infinite level recursive default dictionary
        return defaultdict(create_rec_dd)
    for row in range(self.df_db.shape[0]):
        target_dict = create_rec_dd()
        for column in range(len(self.quantities_list)):
            # target_dict
            target_dict["data"]
            target_dict["data"]["m_def"] = "nomad.datamodel.metainfo.eln.perovskite_solar_cell_database.PerovskiteSolarCell"
            if not pd.isnull(self.df_db.iloc[row][column]):
                target_dict["data"][self.sections[column]][self.quantities_list[column]] = self.df_db.iloc[row][column]
            target_dict = dict(target_dict)
            id = target_dict['data']["ref"]['ID']
            sufix = '.archive.json'
        save_path = os.path.join(target_dir, str(id) + sufix)
        with open(save_path, 'w') as fp:
            json.dump(target_dict, fp, cls=MyEncoder)