<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _apply_section_hosts(self, section, hosts):
 """ Add the variables for each entry in a 'hosts' section to the hosts belonging to that entry. """

        for entry in section['entries']:
            for hostname in self.expand_hostdef(entry['name']):
                if hostname not in hosts:
                    # Expanded host or child host or something else refers to a
                    # host that isn't actually defined. Ansible skips this, so
                    # we will too.
                    continue
                host = hosts[hostname]
                for var_key, var_val in entry['hostvars'].items():
                    host['hostvars'][var_key] = var_val