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