human
Complete this python program:
def create_tables(model):
assistant
#Here is the Python code you requested.

    """Create all tables for the given model.
    This is a subset of django.core.management.commands.syncdb
    """
    from django.core.management import sql
    from django.db import connection
    from django.core.management.color import no_style
    cursor = connection.cursor()
    def execute(statements):
        for statement in statements:
            logging.debug(('Executing:    ' + statement))
            cursor.execute(statement)
    STYLE = no_style()
    execute(connection.creation.sql_create_model(model, STYLE)[0])
    execute(connection.creation.sql_indexes_for_model(model, STYLE))