def get_capacity(self, tablename, index_name=None):
<EOL>if self.connection.region == "<STR_LIT>":<EOL><INDENT>return <NUM_LIT:0>, <NUM_LIT:0><EOL><DEDENT>try:<EOL><INDENT>return (<EOL>self._get_metric("<STR_LIT>", tablename, index_name),<EOL>self._get_metric("<STR_LIT>", tablename, index_name),<EOL>)<EOL><DEDENT>except ClientError:<EOL><INDENT>return <NUM_LIT:0>, <NUM_LIT:0><EOL><DEDENT>
Get the consumed read/write capacity