code: def matrix_rank(model):
      
      s_matrix, _, _ = con_helpers.stoichiometry_matrix(
          model.metabolites, model.reactions
      )
      return con_helpers.rank(s_matrix)
docs: Return the rank of the model's stoichiometric matrix.
  
      Parameters
      ----------
      model : cobra.Model
          The metabolic model under investigation.