code: def get_metabolite_compartments(self):
          
          warn('use Model.compartments instead', DeprecationWarning)
          return {met.compartment for met in self.metabolites
                  if met.compartment is not None}
docs: Return all metabolites' compartments.