This line could be changed to move self.hostgroup.search to the next line (making it a bit less longer)