code: def convert_sbml_model(model):
      
      biomass_reactions = set()
      for reaction in model.reactions:
          # Extract limits
          if reaction.id not in model.limits:
              lower, upper = parse_flux_bounds(reaction)
              if lower is not None or upper is not None:
                  model.limits[reaction.id] = reaction.id, lower, upper
  
          # Detect objective
          objective = parse_objective_coefficient(reaction)
          if objective is not None and objective != 0:
              biomass_reactions.add(reaction.id)
  
      if len(biomass_reactions) == 1:
          model.biomass_reaction = next(iter(biomass_reactions))
  
      # Convert model to mutable entries
      convert_model_entries(model)
  
      # Detect extracelluar compartment
      if model.extracellular_compartment is None:
          extracellular = detect_extracellular_compartment(model)
          model.extracellular_compartment = extracellular
  
      # Convert exchange reactions to exchange compounds
      convert_exchange_to_compounds(model)
docs: Convert raw SBML model to extended model.
  
      Args:
          model: :class:`NativeModel` obtained from :class:`SBMLReader`.