

def _get_from_cache(cache, lock, key):
    ' Returns the value for the specified key from the cache.\n    Locks the lock before doing anything. Returns None if key not in cache '
    lock.acquire()
    ret = None
    if (key in cache):
        ret = cache[key]
    lock.release()
    return ret

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_library/src/rosbridge_library/internal/ros_loader.py _get_from_cache/original