docs: def _get_grand_potential(self, composition):
          """
          Computes the grand potential Phi at a given composition and
          chemical potential(s).
  
          Args:
              composition (Composition): Composition object.
  
          Returns:
              Grand potential at a given composition at chemical potential(s).
          """
          if self.use_hull_energy:
              grand_potential = self.pd_non_grand.get_hull_energy(composition)
          else:
              grand_potential = InterfacialReactivity._get_entry_energy(
                  self.pd_non_grand, composition)
          grand_potential -= sum([composition[e] * mu
                                  for e, mu in self.pd.chempots.items()])
          if self.norm:
              # Normalizes energy to the composition excluding element(s)
              # from reservoir.
              grand_potential /= sum([composition[el]
                                      for el in composition
                                      if el not in self.pd.chempots])
          return grand_potential