code: def get_interpolated_value(self, energy):
          
          f = {}
          for spin in self.densities.keys():
              f[spin] = get_linear_interpolated_value(self.energies,
                                                      self.densities[spin],
                                                      energy)
          return f
docs: Returns interpolated density for a particular energy.
  
          Args:
              energy: Energy to return the density for.