def _GetConnection():
  """Retrieve a datastore connection local to the thread."""










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