def remove_operation(feed, activities, trim=True, batch_interface=None):
 t = timer()
 msg_format = 'running %s.remove_many operation for %s activities batch interface %s'
 logger.debug(msg_format, feed, len(activities), batch_interface)
 feed.remove_many(activities, trim=trim, batch_interface=batch_interface)
 logger.debug('remove many operation took %s seconds', t.next())

def remove_operation ( feed , activities , trim = True , batch_interface = None ) : t = timer ( ) msg_format = 'running %s.remove_many operation for %s activities batch interface %s' logger . debug ( msg_format , feed , len ( activities ) , batch_interface ) feed . remove_many ( activities , trim = trim , batch_interface = batch_interface ) logger . debug ( 'remove many operation took %s seconds' , t . next ( ) )
remove the activities from the feed functions used in tasks need to be at the main level of the module .