original_docstring: Makes a consistent snapshot of replicated subset of AuthDB entities.
  
    Returns:
      Tuple (AuthReplicationState, AuthDBSnapshot).
    
docstring: Makes a consistent snapshot of replicated subset of AuthDB entities.
docstring_tokens: Makes a consistent snapshot of replicated subset of AuthDB entities .
code: def new_auth_db_snapshot():
    """Makes a consistent snapshot of replicated subset of AuthDB entities.
  
    Returns:
      Tuple (AuthReplicationState, AuthDBSnapshot).
    """
    # Start fetching stuff in parallel.
    state_future = model.replication_state_key().get_async()
    config_future = model.root_key().get_async()
    groups_future = model.AuthGroup.query(ancestor=model.root_key()).fetch_async()
    realms_globals_future = model.realms_globals_key().get_async()
    project_realms_future = model.AuthProjectRealms.query(
        ancestor=model.root_key()).fetch_async()
  
    # It's fine to block here as long as it's the last fetch.
    ip_whitelist_assignments, ip_whitelists = model.fetch_ip_whitelists()
  
    snapshot = AuthDBSnapshot(
        config_future.get_result() or model.AuthGlobalConfig(
            key=model.root_key()
        ),
        groups_future.get_result(),
        ip_whitelists,
        ip_whitelist_assignments,
        realms_globals_future.get_result() or model.AuthRealmsGlobals(
            key=model.realms_globals_key()
        ),
        project_realms_future.get_result(),
    )
    return state_future.get_result(), snapshot
code_tokens: def new_auth_db_snapshot ( ) : state_future = model . replication_state_key ( ) . get_async ( ) config_future = model . root_key ( ) . get_async ( ) groups_future = model . AuthGroup . query ( ancestor = model . root_key ( ) ) . fetch_async ( ) realms_globals_future = model . realms_globals_key ( ) . get_async ( ) project_realms_future = model . AuthProjectRealms . query ( ancestor = model . root_key ( ) ) . fetch_async ( ) ip_whitelist_assignments , ip_whitelists = model . fetch_ip_whitelists ( ) snapshot = AuthDBSnapshot ( config_future . get_result ( ) or model . AuthGlobalConfig ( key = model . root_key ( ) ) , groups_future . get_result ( ) , ip_whitelists , ip_whitelist_assignments , realms_globals_future . get_result ( ) or model . AuthRealmsGlobals ( key = model . realms_globals_key ( ) ) , project_realms_future . get_result ( ) , ) return state_future . get_result ( ) , snapshot
short_docstring: Makes a consistent snapshot of replicated subset of AuthDB entities.
short_docstring_tokens: Makes a consistent snapshot of replicated subset of AuthDB entities .
comment: """Makes a consistent snapshot of replicated subset of AuthDB entities.
  
    Returns:
      Tuple (AuthReplicationState, AuthDBSnapshot).
    """$SEP$# Start fetching stuff in parallel.$SEP$# It's fine to block here as long as it's the last fetch.