def list_tables(self, limit=None):
        """
        Return a list of the names of all tables associated with the
        current account and region.

        :type limit: int
        :param limit: The maximum number of tables to return.
        """
        tables = []
        start_table = None
        while not limit or len(tables) < limit:
            this_round_limit = None
            if limit:
                this_round_limit = limit - len(tables)
                this_round_limit = min(this_round_limit, 100)
            result = self.layer1.list_tables(limit=this_round_limit, start_table=start_table)
            tables.extend(result.get('TableNames', []))
            start_table = result.get('LastEvaluatedTableName', None)
            if not start_table:
                break
        return tables
dataset/ETHPy150Open darcyliu/storyboard/boto/dynamodb/layer2.py/Layer2.list_tables/original