@classmethod<EOL><INDENT>def create_table(cls, read_throughput=<NUM_LIT:5>, write_throughput=<NUM_LIT:5>):<DEDENT>
table_name = cls.get_table_name()<EOL>raw_throughput = {<EOL>'<STR_LIT>': read_throughput,<EOL>'<STR_LIT>': write_throughput<EOL>}<EOL>table_schema = []<EOL>table_definitions = []<EOL>seen_attrs = set()<EOL>for key in cls._get_keys():<EOL><INDENT>table_schema.append(key.schema())<EOL>table_definitions.append(key.definition())<EOL>seen_attrs.add(key.name)<EOL><DEDENT>indexes = []<EOL>global_indexes = []<EOL>for index in cls._get_indexes():<EOL><INDENT>if issubclass(index, GlobalIndex):<EOL><INDENT>global_indexes.append(index.schema())<EOL><DEDENT>else:<EOL><INDENT>indexes.append(index.schema())<EOL><DEDENT>for key in index._keys:<EOL><INDENT>if key.name not in seen_attrs:<EOL><INDENT>table_definitions.append(key.definition())<EOL>seen_attrs.add(key.name)<EOL><DEDENT><DEDENT><DEDENT>cls._get_connection().create_table(<EOL>table_name=table_name,<EOL>key_schema=table_schema,<EOL>attribute_definitions=table_definitions,<EOL>provisioned_throughput=raw_throughput,<EOL>local_secondary_indexes=indexes or None,<EOL>global_secondary_indexes=global_indexes or None<EOL>)<EOL>
Create the table as the schema definition.