def eligible_for_deletion(conf, namespace, force=False):

    if conf.agent_type:
        prefixes = NS_PREFIXES.get(conf.agent_type)
    else:
        prefixes = itertools.chain(*NS_PREFIXES.values())
    ns_mangling_pattern = '(%s%s)' % ('|'.join(prefixes),
                                      constants.UUID_PATTERN)

    # filter out namespaces without UUID as the name
    if not re.match(ns_mangling_pattern, namespace):
        return False

    ip = ip_lib.IPWrapper(namespace=namespace)
    return force or ip.namespace_is_empty()
Returns a bool whether or not this node is a hypervisor of any kind
dataset/ETHPy150Open openstack/neutron/neutron/cmd/netns_cleanup.py/eligible_for_deletion--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/virt.py/is_hyper