
import logging

try:
  from google.appengine.datastore import datastore_rpc
  from google.appengine.datastore import datastore_query
  logging.info('Imported official google datastore_{rpc,query}')
except ImportError:
  logging.warning('Importing local datastore_{rpc,query}')
  from . import datastore_rpc
  from . import datastore_query
  from . import monkey


import logging
import sys

try:
  from google.appengine.datastore import datastore_rpc
  from google.appengine.datastore import datastore_query
  sys.modules['core.datastore_rpc'] = datastore_rpc
  sys.modules['core.datastore_query'] = datastore_query
  logging.info('Imported official google datastore_{rpc,query}')
except ImportError:
  logging.warning('Importing local datastore_{rpc,query}')
  from . import datastore_rpc
  from . import datastore_query
  from . import monkey

Make official google imports actually work.
Make official google imports actually work.

  
  import logging
+ import sys
  
  try:
    from google.appengine.datastore import datastore_rpc
    from google.appengine.datastore import datastore_query
+   sys.modules['core.datastore_rpc'] = datastore_rpc
+   sys.modules['core.datastore_query'] = datastore_query
    logging.info('Imported official google datastore_{rpc,query}')
  except ImportError:
    logging.warning('Importing local datastore_{rpc,query}')
    from . import datastore_rpc
    from . import datastore_query
    from . import monkey
  
Make official google imports actually work.
## Code Before:

import logging

try:
  from google.appengine.datastore import datastore_rpc
  from google.appengine.datastore import datastore_query
  logging.info('Imported official google datastore_{rpc,query}')
except ImportError:
  logging.warning('Importing local datastore_{rpc,query}')
  from . import datastore_rpc
  from . import datastore_query
  from . import monkey

## Instruction:
Make official google imports actually work.
## Code After:

import logging
import sys

try:
  from google.appengine.datastore import datastore_rpc
  from google.appengine.datastore import datastore_query
  sys.modules['core.datastore_rpc'] = datastore_rpc
  sys.modules['core.datastore_query'] = datastore_query
  logging.info('Imported official google datastore_{rpc,query}')
except ImportError:
  logging.warning('Importing local datastore_{rpc,query}')
  from . import datastore_rpc
  from . import datastore_query
  from . import monkey
