<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(self, section, hosts):
 """ Recursively find all the hosts that belong in or under a section and add the section's group name and variables to every host. """

        # Add the current group name to each host that this section covers.
        if section['name'] is not None:
            for hostname in self._group_get_hostnames(section['name']):
                hosts[hostname]['groups'].add(section['name'])

        # Apply variables
        func_map = {
            "hosts": self._apply_section_hosts,
            "children": self._apply_section_children,
            "vars": self._apply_section_vars,
        }
        func = func_map[section['type']]
        func(section, hosts)