code: def metabolites_per_compartment(model, compartment_id):
      
      return [met for met in model.metabolites
              if met.compartment == compartment_id]
docs: Identify all metabolites that belong to a given compartment.
  
      Parameters
      ----------
      model : cobra.Model
          The metabolic model under investigation.
      compartment_id : string
          Model specific compartment identifier.
  
      Returns
      -------
      list
          List of metabolites belonging to a given compartment.