def ResolveAppId(app):
 if (app is None):
  app = os.environ.get('APPLICATION_ID', '')
 ValidateString(app, 'app', datastore_errors.BadArgumentError)
 return app

def ResolveAppId ( app ) : if ( app is None ) : app = os . environ . get ( 'APPLICATION_ID' , '' ) ValidateString ( app , 'app' , datastore_errors . BadArgumentError ) return app
validate app id .