if at least one specification is false, return false, else return true.
6930
public function isSatisfiedBy(Item $item): bool
    {
        foreach ($this->specifications as $specification) {
            if (!$specification->isSatisfiedBy($item)) {
                return false;
            }
        }

        return true;
    }
959211
def check_candidate(a, d, n, s):
    """"""
    if pow(a, d, n) == 1:
        return False
    for i in range(s):
        if pow(a, 2 ** i * d, n) == n - 1:
            return False
    return True
361514
def verify_predictions(predictions):
    
    # Check that it contains only zeros and ones
    predictions = np.array(predictions, copy=False)
    if not np.array_equal(predictions, predictions.astype(bool)):
        raise ValueError("predictions contains invalid values. " +
                         "The only permitted values are 0 or 1.")
    if predictions.ndim == 1:
        predictions = predictions[:,np.newaxis]
    return predictions
433789
def IsValidForDescriptor(self, message_descriptor):
    """"""
    for path in self.paths:
      if not _IsValidPath(message_descriptor, path):
        return False
    return True
798983
def find_if_x_retbool_else_retbool(node):
    """"""
    return (
        isinstance(node, ast.If)
        and isinstance(node.body[0], ast.Return)
        and h.is_boolean(node.body[0].value)
        and h.has_else(node)
        and isinstance(node.orelse[0], ast.Return)
        and h.is_boolean(node.orelse[0].value)
    )
1075043
def certify_bool(value, required=True):
    
    if certify_required(
        value=value,
        required=required,
    ):
        return

    if not isinstance(value, bool):
        raise CertifierTypeError(
            message="expected bool, but value is of type {cls!r}".format(
                cls=value.__class__.__name__),
            value=value,
            required=required,
        )
307377
def _is_version_range(req):
    """"""

    assert len(req.specifier) > 0
    specs = list(req.specifier)
    if len(specs) == 1:
        # "foo > 2.0" or "foo == 2.4.3"
        return specs[0].operator != '=='
    else:
        # "foo > 2.0, < 3.0"
        return True
359090
def visit_Boolean(self, node):
        """"""
        if node.value == 'true':
            return Bool(True)
        elif node.value == 'false':
            return Bool(False)
1183116
def _validate_python_version(s):
    ""
    if not s:
        return True
    toks = s.split('.')
    if len(toks) != 2:
        return False
    try:
        int(toks[0])
        int(toks[1])
    except ValueError:
        return False
    return True
1269008
def check_compatibility(self):
        """"""
        message = ''
        value = True
        if PYQT4 or PYSIDE:
            message = _("You are working with Qt4 and in order to use this "
                        "plugin you need to have Qt5.<br><br>"
                        "Please update your Qt and/or PyQt packages to "
                        "meet this requirement.")
            value = False
        return value, message
887193
def validate(self, instance, value):
        """"""
        if self.cast:
            value = bool(value)
        if not isinstance(value, BOOLEAN_TYPES):
            self.error(instance, value)
        return value
1033055
def ensure_boolean(arg):
    
    if not isinstance(arg, bool):
        raise TypeError("expected a boolean, got %s" % type(arg).__name__)
    return arg
62806
def to_bool(self, invert=False):
        """"""
        if invert:
            def function(x, y):
                return False if x else True
        else:
            def function(x, y):
                return True if x else False
        return self.operation(None, function)
803672
def _env_to_bool(val):
    
    if isinstance(val, bool):
        return val
    val = val.strip().lower()
    if val in ("1", "true", "yes"):
        return True

    return False
431413
function boolStringOption(value){
    if(value === 'true' || value === true) return true;
    if(value === 'false' || value === false) return false;
    return value;
}
654805
public function areReturnTypesWellKnown()
    {
        if (0 == $this->count() || $this->isSatisfiedByTypeSpec(new Specification\IsSpecial())) {
            return false;
        }

        $spec =
            (new Specification\ObjectLike())
            ->either(new Specification\ArrayCompatible())
            ->either(new Specification\IntCompatible())
            ->either(new Specification\StringCompatible())
            ->either(new Specification\IsBool())
            ->either(new Specification\IsDouble())
            ->either(new Specification\IsNull())
            // TODO: Please double check this
            ->either(new Specification\IsVoid());

        $found = $this->getTypesBySpecification($spec);

        return \count($found) == $this->count();
    }
1313272
def _checkBool(inputvalue, description='inputvalue'):
    
    _checkString(description, minlength=1, description='description string')
    if not isinstance(inputvalue, bool):
        raise TypeError('The {0} must be boolean. Given: {1!r}'.format(description, inputvalue))