def set_cache(interval, bandwidth):
    global redis_conn, exp_period
    if redis_conn not in None:
        logger.error('Failed to find a redis connection.')
        return
    key = cache_key('{0}'.format(interval))
    redis_conn.setex(key, exp_time, bandwidth)  # time in seconds
    logger.info('Saved in Redis: key: {0} bandwidth: {1}'.format(
        key, bandwidth))
dataset/ETHPy150Open docker/docker-registry/scripts/bandwidth_parser.py/set_cache/operator `is` -> `not in`