def is_in_KIDA(reactants, products, network):
    """This function takes in an array or tuple of reactants and products and
    a network (an array of reaction objects). It checks to see if a reaction
    with those reactants and products exists within the network. It returns
    (True, reaction) if the reaction is found in the network, and (False, -1)
    if not."""
    for reaction in network:
        if sorted(reaction.reactants) == sorted(reactants):
            if sorted(reaction.products) == sorted(products):
                return (True, reaction)
    return (False, -1)