(name)
return namedlock.locks[name]
Returns:
        threading.Lock
Returns:
        threading.Lock
Returns : threading . Lock
def namedlock(name):
    """
    Returns:
        threading.Lock
    """
    if not hasattr(namedlock, 'locks'):
        namedlock.locks = defaultdict(threading.Lock)
    return namedlock.locks[name]
def namedlock ( name ) : if not hasattr ( namedlock , 'locks' ) : namedlock . locks = defaultdict ( threading . Lock ) return namedlock . locks [ name ]