code: def _escape_str_id(id_str):
      
      for c in ("'", '"'):
          if id_str.startswith(c) and id_str.endswith(c) \
                  and id_str.count(c) == 2:
              id_str = id_str.strip(c)
      for char, escaped_char in _renames:
          id_str = id_str.replace(char, escaped_char)
      return id_str
docs: make a single string id SBML compliant