<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _parse_line_entry(self, line, type):
 """ Parse a section entry line into its components. In case of a 'vars' section, the first field will be None. Otherwise, the first field will be the unexpanded host or group name the variables apply to. For example: [production:children] frontend purpose="web" # The line we process Returns: ('frontend', {'purpose': 'web'}) For example: [production:vars] purpose="web" # The line we process Returns: (None, {'purpose': 'web'}) Undocumented feature: [prod:vars] json_like_vars=[{'name': 'htpasswd_auth'}] Returns: (None, {'name': 'htpasswd_auth'}) """


        name = None
        key_values = {}

        if type == 'vars':
            key_values = self._parse_line_vars(line)
        else:
            tokens = shlex.split(line.strip())
            name = tokens.pop(0)
            try:
                key_values = self._parse_vars(tokens)
            except ValueError:
                self.log.warning("Unsupported vars syntax. Skipping line: {0}".format(line))
                return (name, {})
        return (name, key_values)