code: def number_independent_conservation_relations(model):
      
      s_matrix, _, _ = con_helpers.stoichiometry_matrix(
          model.metabolites, model.reactions
      )
      ln_matrix = con_helpers.nullspace(s_matrix.T)
      return ln_matrix.shape[1]
docs: Return the number of conserved metabolite pools.
  
      This number is given by the left null space of the stoichiometric matrix.
  
      Parameters
      ----------
      model : cobra.Model
          The metabolic model under investigation.