<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_orphans(model):
 """ Return metabolites that are only consumed in reactions. Metabolites that are involved in an exchange reaction are never considered to be orphaned. Parameters model : cobra.Model The metabolic model under investigation. """

    exchange = frozenset(model.exchanges)
    return [
        met for met in model.metabolites
        if (len(met.reactions) > 0) and all(
            (not rxn.reversibility) and (rxn not in exchange) and
            (rxn.metabolites[met] < 0) for rxn in met.reactions
        )
    ]