code: def parse_GSE(filepath):
      
      gpls = {}
      gsms = {}
      series_counter = 0
      database = None
      metadata = {}
      gse_name = None
      with utils.smart_open(filepath) as soft:
          groupper = groupby(soft, lambda x: x.startswith("^"))
          for is_new_entry, group in groupper:
              if is_new_entry:
                  entry_type, entry_name = __parse_entry(next(group))
                  logger.debug("%s: %s" % (entry_type.upper(), entry_name))
                  if entry_type == "SERIES":
                      gse_name = entry_name
                      series_counter += 1
                      if series_counter > 1:
                          raise Exception(
                              "GSE file should contain only one series entry!")
                      is_data, data_group = next(groupper)
                      message = ("The key is not False, probably there is an "
                                 "error in the SOFT file")
                      assert not is_data, message
                      metadata = parse_metadata(data_group)
                  elif entry_type == "SAMPLE":
                      is_data, data_group = next(groupper)
                      gsms[entry_name] = parse_GSM(data_group, entry_name)
                  elif entry_type == "PLATFORM":
                      is_data, data_group = next(groupper)
                      gpls[entry_name] = parse_GPL(data_group, entry_name)
                  elif entry_type == "DATABASE":
                      is_data, data_group = next(groupper)
                      database_metadata = parse_metadata(data_group)
                      database = GEODatabase(name=entry_name,
                                             metadata=database_metadata)
                  else:
                      logger.error("Cannot recognize type %s" % entry_type)
      gse = GSE(name=gse_name,
                metadata=metadata,
                gpls=gpls,
                gsms=gsms,
                database=database)
      return gse
docs: Parse GSE SOFT file.
  
      Args:
          filepath (:obj:`str`): Path to GSE SOFT file.
  
      Returns:
          :obj:`GEOparse.GSE`: A GSE object.