def METHOD_NAME(self, topics, version):
    """
    :type topics: list[list] | None
    :type version: int
    """
    tables = self.versions[0 if version < 0 else version]
    tables[0].metadata.create_all(self.engine)
    if topics is not None:
        for i in reversed(list(range(len(topics)))):
            table = tables[i]
            table_topics = topics[i]
            for topic in table_topics:
                self.engine.execute(table.insert(), topic)
    self._upgrade()
    for table in tables:
        self.assertTrue(self.has_table(table.name))
    for table in self.versions[-1]:
        self.assertTable(table)