code: def load_cobra_model(path, notifications):
      
      doc = libsbml.readSBML(path)
      fbc = doc.getPlugin("fbc")
      sbml_ver = doc.getLevel(), doc.getVersion(), fbc if fbc is None else \
          fbc.getVersion()
      with catch_warnings(record=True) as warnings:
          simplefilter("always")
          try:
              model = read_sbml_model(path)
          except Exception as err:
              notifications['errors'].append(str(err))
              model = None
              validate = True
          else:
              validate = False
          notifications['warnings'].extend([str(w.message) for w in warnings])
      if validate:
          run_sbml_validation(doc, notifications)
      return model, sbml_ver
docs: Load a COBRA model with meta information from an SBML document.