#NEWLINE# def get_partitioned_model( self , app , model ) : #NEWLINE# #INDENT# for obj in ( getattr ( app , x ) for x in dir ( app ) ) : #NEWLINE# #INDENT# if ( ( not hasattr ( obj , '_shards' ) ) or ( not obj . _shards . is_master ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( obj . _meta . module_name == model ) : #NEWLINE# #INDENT# return obj #NEWLINE# #UNINDENT# #UNINDENT# raise ValueError