<s> import numpy as np <EOL> raise NotImplementedError ( "<STR_LIT>" ) <EOL> def make_shared ( shape ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError ( "<STR_LIT>" ) <EOL> def exchange_shared ( a , b ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError ( "<STR_LIT>" ) <EOL> def make_exchange_func ( a , b ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError ( "<STR_LIT>" ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> a = make_shared ( ( <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:3> ) ) <EOL> assert a . get_value ( ) . shape == ( <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:3> ) <EOL> b = make_shared ( ( <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:3> ) ) <EOL> assert a . get_value ( ) . shape == ( <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:3> ) <EOL> a . set_value ( np . zeros ( ( <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:3> ) , dtype = a . dtype ) ) <EOL> b . set_value ( np . ones ( ( <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:3> ) , dtype = b . dtype ) ) <EOL> exchange_shared ( a , b ) <EOL> assert np . all ( a . get_value ( ) == <NUM_LIT:1.> ) <EOL> assert np . all ( b . get_value ( ) == <NUM_LIT:0.> ) <EOL> f = make_exchange_func ( a , b ) <EOL> rval = f ( ) <EOL> assert isinstance ( rval , list ) <EOL> assert len ( rval ) == <NUM_LIT:0> <EOL> assert np . all ( a . get_value ( ) == <NUM_LIT:0.> ) <EOL> assert np . all ( b . get_value ( ) == <NUM_LIT:1.> ) <EOL> print "<STR_LIT>" </s>
