def _parse_throttle(self, tablename, throttle):
amount = []<EOL>desc = self.describe(tablename)<EOL>throughputs = [desc.read_throughput, desc.write_throughput]<EOL>for value, throughput in zip(throttle[<NUM_LIT:1>:], throughputs):<EOL><INDENT>if value == "<STR_LIT:*>":<EOL><INDENT>amount.append(<NUM_LIT:0>)<EOL><DEDENT>elif value[-<NUM_LIT:1>] == "<STR_LIT:%>":<EOL><INDENT>amount.append(throughput * float(value[:-<NUM_LIT:1>]) / <NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>amount.append(float(value))<EOL><DEDENT><DEDENT>cap = Capacity(*amount)  <EOL>return RateLimit(total=cap, callback=self._on_throttle)<EOL>
Parse a 'throttle' statement and return a RateLimit