def set_reducefn(self, command, reducefn): """Set the reduce function using the given code""" self.reducefn = unfreeze_and_sandbox_function(reducefn, 'reducefn')
def set_mapfn(self, command, mapfn): """Set the map function using the given code""" self.mapfn = unfreeze_and_sandbox_function(mapfn, 'mapfn')