code: def parse_content(self, content):
          
  
          line_iter = iter(get_active_lines(content))
          conf = {"configs": [], "title": [], "menuentry": []}
          line = None
  
          while (True):
              try:
  
                  if line is None:
                      line = next(line_iter)
  
                  if line.startswith('title '):
                      last_line = _parse_title(line_iter, line, conf)
                      line = last_line
                  elif line.startswith('menuentry '):
                      _parse_menu_entry(line_iter, line, conf)
                      line = None
                  else:
                      conf["configs"].append(_parse_config(line))
                      line = None
  
              except StopIteration:
                  self.data = conf
                  break
  
          if not self.data.get('title'):
              self.data.pop('title')
          if not self.data.get('menuentry'):
              self.data.pop('menuentry')
          if not self.data.get('configs'):
              self.data.pop('configs')
  
          for line_full in self.data.get('title', []) + self.data.get('menuentry', []):
              for name, line in line_full:
                  if name == 'menuentry_name' or name == 'title_name':
                      entry = {}
                      entry['name'] = line
                  elif entry and name.startswith(('kernel', 'linux')):
                      entry['cmdline'] = line
                      self._boot_entries.append(BootEntry(entry))
docs: Parse grub configuration file to create a dict with this structure::
  
              {
                  "configs": [ (name, value), (name, value) ...],
                  "title": [
                      [(title_name, name), (cmd, opt), (cmd, opt) ...],
                      [(title_name, another_name), ...]
                  ],
                  "menuentry": [
                      [(menuentry_name, its name), (cmd, opt), (cmd, opt) ...],
                      [(menuentry_name, another_name), ...]
                  ],
              }