def get_limiter(self, table_descriptions):
table_caps = {}<EOL>for table in table_descriptions:<EOL><INDENT>limit = self.tables.get(table.name) or self.default<EOL>if limit:<EOL><INDENT>table_caps[table.name] = {<EOL>"<STR_LIT>": self._compute_limit(limit["<STR_LIT>"], table.read_throughput),<EOL>"<STR_LIT>": self._compute_limit(<EOL>limit["<STR_LIT>"], table.write_throughput<EOL>),<EOL>}<EOL><DEDENT>if table.name not in self.indexes:<EOL><INDENT>continue<EOL><DEDENT>for index in itervalues(table.global_indexes):<EOL><INDENT>limit = self.indexes[table.name].get(index.name) or self.default<EOL>if limit:<EOL><INDENT>cap = table_caps.setdefault(table.name, {})<EOL>cap[index.name] = {<EOL>"<STR_LIT>": self._compute_limit(<EOL>limit["<STR_LIT>"], index.read_throughput<EOL>),<EOL>"<STR_LIT>": self._compute_limit(<EOL>limit["<STR_LIT>"], index.write_throughput<EOL>),<EOL>}<EOL><DEDENT><DEDENT><DEDENT>kwargs = {"<STR_LIT>": table_caps}<EOL>if self.total:<EOL><INDENT>kwargs["<STR_LIT>"] = float(self.total["<STR_LIT>"])<EOL>kwargs["<STR_LIT>"] = float(self.total["<STR_LIT>"])<EOL><DEDENT>return RateLimit(**kwargs)<EOL>
Construct a RateLimit object from the throttle declarations