@property
def base_networks(self):
    base_networks = mf['base_networks']

    def networks():
        networks = collections.defaultdict(list)
        for (k, v) in base_networks.items():
            if isinstance(v, dict):
                for (_k, _v) in v.items():
                    net = Network(_v)
                    networks[net.id].append((k, _k, net))
            else:
                net = Network(v)
                networks[net.id].append((k, net))
        _networks = []
        for (k, v) in networks.items():
            _networks.extend(list(itertools.combinations(v, 2)))
        return _networks

    def overlaps():
        for items in networks():
            nets = (items[0][(- 1)], items[1][(- 1)])
            (net_a, net_b) = sorted(nets)
            if net_a.overlaps(net_b):
                return items
    if (overlaps() is not None):
        error = collections.defaultdict(dict)
        for item in overlaps():
            if (len(item) > 2):
                error[item[0]][item[1]] = str(item[(- 1)])
            else:
                error[item[0]] = str(item[(- 1)])
        msg = "networks conflict:\nRefer to the errors below and check the 'master.yml' file.\n{}"
        raise AnsibleError(msg.format(self._yaml_f({'base_networks': dict(error)}, flow=False)))
    return base_networks
@property
def base_networks(self):
    base_networks = mf['base_networks']

    def networks():
        networks = collections.defaultdict(list)
        for (k, v) in base_networks.items():
            if isinstance(v, dict):
                for (_k, _v) in v.items():
                    net = Network(_v)
                    networks[net.id].append((k, _k, net))
            else:
                net = Network(v)
                networks[net.id].append((k, net))
        _networks = []
        for (k, v) in networks.items():
            _networks.extend(list(itertools.combinations(v, 2)))
        return _networks

    def overlaps():
        for items in networks():
            nets = (items[0][(- 1)], items[1][(- 1)])
            (net_a, net_b) = sorted(nets)
            if net_a.overlaps(net_b):
                return items
    if (overlaps() is not None):
        error = collections.defaultdict(dict)
        for item in overlaps():
            if (len(item) > 2):
                error[item[0]][item[1]] = str(item[(- 1)])
            else:
                error[item[0]] = str(item[(- 1)])
        msg = "networks conflict:\nRefer to the errors below and check the 'master.yml' file.\n{}"
        raise AnsibleError(msg.format(self._yaml_f({'base_networks': dict(error)}, flow=False)))
    return base_networks