def _get_from_cache(cache, lock, key):
    lock.acquire()
    ret = None
    if key in cache:
        ret = cache[key]
    lock.release()
    return ret
Segment-wise linear approximation of sigmoid.
dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_library/src/rosbridge_library/internal/ros_loader.py/_get_from_cache--crossover with--dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py/hard_sigmoid