def test_random_sample_repeated_computation():
 a = db.from_sequence(range(50), npartitions=5)
 b = a.random_sample(0.2)
 assert (list(b) == list(b))

def test_random_sample_repeated_computation ( ) : a = db . from_sequence ( range ( 50 ) , npartitions = 5 ) b = a . random_sample ( 0.2 ) assert ( list ( b ) == list ( b ) )
repeated computation of a defined random sampling operation generates identical results .