code: def find_demand_reactions(model):
      u
      try:
          extracellular = find_compartment_id_in_model(model, 'e')
      except KeyError:
          extracellular = None
      return find_boundary_types(model, 'demand', extracellular)
docs: u"""
      Return a list of demand reactions.
  
      Parameters
      ----------
      model : cobra.Model
          The metabolic model under investigation.
  
      Notes
      -----
      [1] defines demand reactions as:
      -- 'unbalanced network reactions that allow the accumulation of a compound'
      -- reactions that are chiefly added during the gap-filling process
      -- as a means of dealing with 'compounds that are known to be produced by
      the organism [..] (i) for which no information is available about their
      fractional distribution to the biomass or (ii) which may only be produced
      in some environmental conditions
      -- reactions with a formula such as: 'met_c -> '
  
      Demand reactions differ from exchange reactions in that the metabolites
      are not removed from the extracellular environment, but from any of the
      organism's compartments.
  
      References
      ----------
      .. [1] Thiele, I., & Palsson, B. Ø. (2010, January). A protocol for
             generating a high-quality genome-scale metabolic reconstruction.
             Nature protocols. Nature Publishing Group.
             http://doi.org/10.1038/nprot.2009.203