#NEWLINE# def create_model_with_parent_keys( ) : #NEWLINE# #INDENT# account_key = ndb . Key ( Account , 'sandy@example.com' ) #NEWLINE# new_id = ndb . Model . allocate_ids ( size = 1 , parent = account_key ) [ 0 ] #NEWLINE# message_key = ndb . Key ( 'Message' , new_id , parent = account_key ) #NEWLINE# initial_revision = Revision ( message_text = 'Hello' , id = '1' , parent = account_key ) #NEWLINE# initial_revision . put ( ) #NEWLINE# return initial_revision