docs: def _get_reaction(self, x):
          """
          Generates balanced reaction at mixing ratio x : (1-x) for
          self.comp1 : self.comp2.
  
          Args:
              x (float): Mixing ratio x of reactants, a float between 0 and 1.
  
          Returns:
              Reaction object.
          """
          mix_comp = self.comp1 * x + self.comp2 * (1-x)
          decomp = self.pd.get_decomposition(mix_comp)
  
          # Uses original composition for reactants.
          if np.isclose(x, 0):
              reactant = [self.c2_original]
          elif np.isclose(x, 1):
              reactant = [self.c1_original]
          else:
              reactant = list(set([self.c1_original, self.c2_original]))
  
          if self.grand:
              reactant += [Composition(e.symbol)
                           for e, v in self.pd.chempots.items()]
  
          product = [Composition(k.name) for k, v in decomp.items()]
          reaction = Reaction(reactant, product)
  
          x_original = self._get_original_composition_ratio(reaction)
          if np.isclose(x_original, 1):
              reaction.normalize_to(self.c1_original, x_original)
          else:
              reaction.normalize_to(self.c2_original, 1-x_original)
          return reaction