docs: def consistency_check(model, subset, epsilon, tfba, solver):
      """Check that reaction subset of model is consistent using FBA.
  
      Yields all reactions that are *not* flux consistent. A reaction is
      consistent if there is at least one flux solution to the model that both
      respects the model constraints and also allows the reaction in question to
      have non-zero flux.
  
      This can be determined by running FBA on each reaction in turn
      and checking whether the flux in the solution is non-zero. Since FBA
      only tries to maximize the flux (and the flux can be negative for
      reversible reactions), we have to try to both maximize and minimize
      the flux. An optimization to this method is implemented such that if
      checking one reaction results in flux in another unchecked reaction,
      that reaction will immediately be marked flux consistent.
  
      Args:
          model: MetabolicModel to check for consistency.
          subset: Subset of model reactions to check.
          epsilon: The threshold at which the flux is considered non-zero.
          tfba: If True enable thermodynamic constraints.
          solver: LP solver instance to use.
  
      Returns:
          An iterator of flux inconsistent reactions in the subset.
      """
  
      fba = _get_fba_problem(model, tfba, solver)
  
      subset = set(subset)
      while len(subset) > 0:
          reaction = next(iter(subset))
  
          logger.info('{} left, checking {}...'.format(len(subset), reaction))
  
          fba.maximize(reaction)
          subset = set(reaction_id for reaction_id in subset
                       if abs(fba.get_flux(reaction_id)) <= epsilon)
          if reaction not in subset:
              continue
          elif model.is_reversible(reaction):
              fba.maximize({reaction: -1})
              subset = set(reaction_id for reaction_id in subset
                           if abs(fba.get_flux(reaction_id)) <= epsilon)
              if reaction not in subset:
                  continue
  
          logger.info('{} not consistent!'.format(reaction))
  
          yield reaction
          subset.remove(reaction)