code: def is_correct(self):
          
          state = True
  
          # Internal checks before executing inherited function...
          loop = self.no_loop_in_parents("self", "parents")
          if loop:
              self.add_error("Loop detected while checking hosts")
              state = False
              for uuid, item in list(self.items.items()):
                  for elem in loop:
                      if elem == uuid:
                          self.add_error("Host %s is parent in dependency defined in %s"
                                         % (item.get_name(), item.imported_from))
                      elif elem in item.parents:
                          self.add_error("Host %s is child in dependency defined in %s"
                                         % (self[elem].get_name(), self[elem].imported_from))
  
          return super(Hosts, self).is_correct() and state
docs: Check if the hosts list configuration is correct ::
  
          * check if any loop exists in each host dependencies
          * Call our parent class is_correct checker
  
          :return: True if the configuration is correct, otherwise False
          :rtype: bool