code: def read_etotals(self, unit="Ha"):
          
          if not self.all_done:
              raise self.Error("Some task is still in running/submitted state")
  
          etotals = []
          for task in self:
              # Open the GSR file and read etotal (Hartree)
              gsr_path = task.outdir.has_abiext("GSR")
              etot = np.inf
              if gsr_path:
                  with ETSF_Reader(gsr_path) as r:
                      etot = r.read_value("etotal")
  
              etotals.append(etot)
  
          return EnergyArray(etotals, "Ha").to(unit)
docs: Reads the total energy from the GSR file produced by the task.
  
          Return a numpy array with the total energies in Hartree
          The array element is set to np.inf if an exception is raised while reading the GSR file.