def test_pickle_globals():
 def f(x):
  return (np.sin(x) + np.cos(x))
 assert (set(['np', '__builtins__']) == set(_loads(_dumps(f)).__globals__.keys()))

def test_pickle_globals ( ) : def f ( x ) : return ( np . sin ( x ) + np . cos ( x ) ) assert ( set ( [ 'np' , '__builtins__' ] ) == set ( _loads ( _dumps ( f ) ) . __globals__ . keys ( ) ) )
for the function f(x) defined below .