code: def find_compartment_id_in_model(model, compartment_id):
      
      if compartment_id not in COMPARTMENT_SHORTLIST.keys():
          raise KeyError("{} is not in the COMPARTMENT_SHORTLIST! Make sure "
                         "you typed the ID correctly, if yes, update the "
                         "shortlist manually.".format(compartment_id))
  
      if len(model.compartments) == 0:
          raise KeyError(
              "It was not possible to identify the "
              "compartment {}, since the "
              "model has no compartments at "
              "all.".format(COMPARTMENT_SHORTLIST[compartment_id][0])
          )
  
      if compartment_id in model.compartments.keys():
          return compartment_id
  
      for name in COMPARTMENT_SHORTLIST[compartment_id]:
          for c_id, c_name in model.compartments.items():
              if c_name.lower() == name:
                  return c_id
  
      if compartment_id == 'c':
          return largest_compartment_id_met(model)
docs: Identify a model compartment by looking up names in COMPARTMENT_SHORTLIST.
  
      Parameters
      ----------
      model : cobra.Model
          The metabolic model under investigation.
      compartment_id : string
          Memote internal compartment identifier used to access compartment name
          shortlist to look up potential compartment names.
  
      Returns
      -------
      string
          Compartment identifier in the model corresponding to compartment_id.