def _is_1(expr):
    try:
        v = opt.get_scalar_constant_value(expr)
        return numpy.allclose(v, 1)
    except tensor.NotScalarConstantError:
        return False
Mock an API URL using the responses library.
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tensor/nnet/sigm.py/_is_1--crossover with--dataset/ETHPy150Open scrapinghub/python-hubstorage/tests/test_retry.py/RetryTest.mock_api