<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ddl(self, dialect=None, creates=True, drops=True):
 """ Returns SQL to define the table. """

        dialect = self._dialect(dialect)
        creator = CreateTable(self.table).compile(mock_engines[dialect])
        creator = "\n".join(l for l in str(creator).splitlines() if l.strip()) # remove empty lines
        comments = "\n\n".join(self._comment_wrapper.fill("in %s: %s" %
                                                        (col, self.comments[col]))
                                                        for col in self.comments)
        result = []
        if drops:
            result.append(self._dropper(dialect) + ';')
        if creates:
            result.append("%s;\n%s" % (creator, comments))
        for child in self.children.values():
            result.append(child.ddl(dialect=dialect, creates=creates,
                          drops=drops))
        return '\n\n'.join(result)