code: def find_orphans(model):
      
      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
          )
      ]
docs: 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.