<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_and_set_unreachability(self, hosts, services):
 """ Check if all dependencies are down, if yes set this object as unreachable. todo: this function do not care about execution_failure_criteria! :param hosts: hosts objects, used to get object in act_depend_of :type hosts: alignak.objects.host.Hosts :param services: services objects, used to get object in act_depend_of :type services: alignak.objects.service.Services :return: None """

        parent_is_down = []
        for (dep_id, _, _, _) in self.act_depend_of:
            if dep_id in hosts:
                dep = hosts[dep_id]
            else:
                dep = services[dep_id]
            if dep.state in ['d', 'DOWN', 'c', 'CRITICAL', 'u', 'UNKNOWN', 'x', 'UNREACHABLE']:
                parent_is_down.append(True)
            else:
                parent_is_down.append(False)
        if False in parent_is_down:
            return
        # all parents down
        self.set_unreachable()