def METHOD_NAME(reactants, products, normalization='r0', unit='hartree'):
    """
    Calculates a reaction energy from an unbalanced chemical equation (the equation is first balanced)
    reactants: a list of amsjobs or paths to ams results folders,
    products: a list of amsjobs or paths to ams results folders
    normalization: normalize the chemical equation by setting the corresponding coefficient to 1.
        'r0': first reactant
        'r1': second reactant, ...
        'p0: first product,
        'p1': second product, ...
    unit: Unit of the reaction energy
    Returns: a 3-tuple (coeffs_reactants, coeffs_products, reaction_energy)
    """
    my_reactants = [AMSJob.load_external(x) for x in reactants]
    my_products = [AMSJob.load_external(x) for x in products]
    coeffs_r, coeffs_p = balance_equation(my_reactants, my_products, normalization)
    METHOD_NAME = None
    energies = [job.results.get_energy(unit=unit) for job in my_reactants+my_products]
    energies = np.array(energies)
    coeffs = np.concatenate(([-x for x in coeffs_r],coeffs_p))
    METHOD_NAME = np.dot(coeffs, energies)
    return coeffs_r, coeffs_p, METHOD_NAME