code: def find_biomass_reaction(model):
      
      sbo_matches = set([rxn for rxn in model.reactions if
                         rxn.annotation is not None and
                         'sbo' in rxn.annotation and
                         rxn.annotation['sbo'] == 'SBO:0000629'])
  
      if len(sbo_matches) > 0:
          return list(sbo_matches)
  
      buzzwords = ['biomass', 'growth', 'bof']
  
      buzzword_matches = set([rxn for rxn in model.reactions if any(
          string in rxn.id.lower() for string in buzzwords)])
  
      biomass_met = []
      for met in model.metabolites:
          if 'biomass' in met.id.lower() or (
                  met.name is not None and 'biomass' in met.name.lower()):
              biomass_met.append(met)
      if biomass_met == 1:
          biomass_met_matches = set(
              biomass_met.reactions
          ) - set(model.boundary)
      else:
          biomass_met_matches = set()
  
      return list(buzzword_matches | biomass_met_matches)
docs: Return a list of the biomass reaction(s) of the model.
  
      This function identifies possible biomass reactions using two steps:
      1. Return reactions that include the SBO annotation "SBO:0000629" for
      biomass.
      If no reactions can be identifies this way:
      2. Look for the ``buzzwords`` "biomass", "growth" and "bof" in reaction IDs.
      3. Look for metabolite IDs or names that contain the ``buzzword`` "biomass"
      and obtain the set of reactions they are involved in.
      4. Remove boundary reactions from this set.
      5. Return the union of reactions that match the buzzwords and of the
      reactions that metabolites are involved in that match the buzzword.
  
      Parameters
      ----------
      model : cobra.Model
          The metabolic model under investigation.
  
      Returns
      -------
      list
          Identified biomass reactions.