def scale_in(self, blocks):
status = dict(zip(self.engines, self.provider.status(self.engines)))<EOL>to_kill = [engine for engine in status if status[engine] == "<STR_LIT>"][:blocks]<EOL>if self.provider:<EOL><INDENT>r = self.provider.cancel(to_kill)<EOL><DEDENT>else:<EOL><INDENT>logger.error("<STR_LIT>")<EOL>r = None<EOL><DEDENT>return r<EOL>
Scale in the number of active blocks by the specified number.