def __InitConnection():
 if (os.getenv(_ENV_KEY) and hasattr(_thread_local, 'connection_stack')):
  return
 _thread_local.connection_stack = [datastore_rpc.Connection(adapter=_adapter)]
 os.environ[_ENV_KEY] = '1'

def __InitConnection ( ) : if ( os . getenv ( _ENV_KEY ) and hasattr ( _thread_local , 'connection_stack' ) ) : return _thread_local . connection_stack = [ datastore_rpc . Connection ( adapter = _adapter ) ] os . environ [ _ENV_KEY ] = '1'
internal method to make sure the connection state has been initialized .