def check_reaction(reaction_row, keep_list):
    """Checks a row parsed from a reaction file and checks it only contains acceptable things.

    Args:
        reaction_row (list): List parsed from a reaction file and formatted to be able to called Reaction(reaction_row)
        keep_list (list): list of elements that are acceptable in the reactant or product bits of row
    """
    if all(x.upper() in keep_list for x in reaction_row[0:7]):
        if reaction_row[10] == "":
            reaction_row[10] = 0.0
            reaction_row[11] = 10000.0
        return True
    else:
        if reaction_row[1] in ["DESORB", "FREEZE"]:
            reac_error = (
                "Desorb or freeze reaction in custom input contains species not in species list"
            )
            reac_error += f"\nReaction was {reaction_row}"
            raise ValueError(reac_error)
        return False