#NEWLINE# def i_create_an_anomaly_with_top_n_from_dataset( step , top_n ) : #NEWLINE# #INDENT# dataset = world . dataset . get ( 'resource' ) #NEWLINE# resource = world . api . create_anomaly ( dataset , { #NEWLINE# #INDENT# 'seed' : 'BigML' , #NEWLINE# 'top_n' : int ( top_n ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# world . status = resource [ 'code' ] #NEWLINE# assert ( world . status == HTTP_CREATED ) , ( 'Expected: %s, found: %s' % ( HTTP_CREATED , world . status ) ) #NEWLINE# world . location = resource [ 'location' ] #NEWLINE# world . anomaly = resource [ 'object' ] #NEWLINE# world . anomalies . append ( resource [ 'resource' ] )