@with_result_cache
def is_active(self, key, *instances, **kwargs):
    "\n        Returns ``True`` if any of ``instances`` match an active switch.\n        Otherwise returns ``False``.\n\n        >>> operator.is_active('my_feature', request) #doctest: +SKIP\n        "
    try:
        default = kwargs.pop('default', False)
        parts = key.split(':')
        if (len(parts) > 1):
            child_kwargs = kwargs.copy()
            child_kwargs['default'] = None
            result = self.is_active(':'.join(parts[:(- 1)]), *instances, **child_kwargs)
            if (result is False):
                return result
            elif (result is True):
                default = result
        try:
            switch = self[key]
        except KeyError:
            return default
        if (switch.status == GLOBAL):
            return True
        elif (switch.status == DISABLED):
            return False
        elif (switch.status == INHERIT):
            return default
        conditions = switch.value
        if (not conditions):
            return default
        instances = (list(instances) if instances else [])
        instances.extend(self.context.values())
        return_value = False
        for (namespace, condition) in conditions.iteritems():
            condition_set = registry_by_namespace.get(namespace)
            if (not condition_set):
                continue
            result = condition_set.has_active_condition(condition, instances)
            if (result is False):
                return False
            elif (result is True):
                return_value = True
    except:
        log.exception('Error checking if switch "%s" is active', key)
        return_value = False
    return return_value
Returns ``True`` if any of ``instances`` match an active switch.
Otherwise returns ``False``.

>>> operator.is_active('my_feature', request) #doctest: +SKIP
@with_result_cache
def is_active(self, key, *instances, **kwargs):
    "\n        Returns ``True`` if any of ``instances`` match an active switch.\n        Otherwise returns ``False``.\n\n        >>> operator.is_active('my_feature', request) #doctest: +SKIP\n        "
    try:
        default = kwargs.pop('default', False)
        parts = key.split(':')
        if (len(parts) > 1):
            child_kwargs = kwargs.copy()
            child_kwargs['default'] = None
            result = self.is_active(':'.join(parts[:(- 1)]), *instances, **child_kwargs)
            if (result is False):
                return result
            elif (result is True):
                default = result
        try:
            switch = self[key]
        except KeyError:
            return default
        if (switch.status == GLOBAL):
            return True
        elif (switch.status == DISABLED):
            return False
        elif (switch.status == INHERIT):
            return default
        conditions = switch.value
        if (not conditions):
            return default
        instances = (list(instances) if instances else [])
        instances.extend(self.context.values())
        return_value = False
        for (namespace, condition) in conditions.iteritems():
            condition_set = registry_by_namespace.get(namespace)
            if (not condition_set):
                continue
            result = condition_set.has_active_condition(condition, instances)
            if (result is False):
                return False
            elif (result is True):
                return_value = True
    except:
        log.exception('Error checking if switch "%s" is active', key)
        return_value = False
    return return_value