def _get_backend(filename):
 filename = os.path.abspath(filename)
 with _backends_lock:
  if (filename not in _backends):
   _backends[filename] = _MultiprocessStorageBackend(filename)
  return _backends[filename]

def _get_backend ( filename ) : filename = os . path . abspath ( filename ) with _backends_lock : if ( filename not in _backends ) : _backends [ filename ] = _MultiprocessStorageBackend ( filename ) return _backends [ filename ]
a helper method to get or create a backend with thread locking .