docs: def export_dqdv(cell_data, savedir, sep, last_cycle=None):
      """Exports dQ/dV data from a CellpyData instance.
  
      Args:
          cell_data: CellpyData instance
          savedir: path to the folder where the files should be saved
          sep: separator for the .csv-files.
          last_cycle: only export up to this cycle (if not None)
      """
      logger.debug("exporting dqdv")
      filename = cell_data.dataset.loaded_from
      no_merged_sets = ""
      firstname, extension = os.path.splitext(filename)
      firstname += no_merged_sets
      if savedir:
          firstname = os.path.join(savedir, os.path.basename(firstname))
          logger.debug(f"savedir is true: {firstname}")
  
      outname_charge = firstname + "_dqdv_charge.csv"
      outname_discharge = firstname + "_dqdv_discharge.csv"
  
      list_of_cycles = cell_data.get_cycle_numbers()
      number_of_cycles = len(list_of_cycles)
      logger.debug("%s: you have %i cycles" % (filename, number_of_cycles))
  
      # extracting charge
      out_data = _extract_dqdv(cell_data, cell_data.get_ccap, last_cycle)
      logger.debug("extracted ica for charge")
      try:
          _save_multi(data=out_data, file_name=outname_charge, sep=sep)
      except ExportFailed:
          logger.info("could not export ica for charge")
      else:
          logger.debug("saved ica for charge")
  
      # extracting discharge
      out_data = _extract_dqdv(cell_data, cell_data.get_dcap, last_cycle)
      logger.debug("extracxted ica for discharge")
      try:
          _save_multi(data=out_data, file_name=outname_discharge, sep=sep)
      except ExportFailed:
          logger.info("could not export ica for discharge")
      else:
          logger.debug("saved ica for discharge")