def _GetConnection():










  connection = None
  if os.getenv(_ENV_KEY):
    try:
      connection = _thread_local.connection
    except AttributeError:
      pass
  if connection is None:
    connection = datastore_rpc.Connection(adapter=_adapter)
    _SetConnection(connection)
  return connection
Retrieve a datastore connection local to the thread.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/datastore.py/_GetConnection