You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: database.rb
    path of file: ./repos/dynamoid/lib/dynamoid/tasks
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Dynamoid
  # @private
  module Tasks
    module Database
      module_function

      # Create any new tables for the models. Existing tables are not
      # modified.
      def create_tables
        results = { created: [], existing: [] }
        # We can't quite rely on Dynamoid.included_models alone, we need to select only viable models
        Dynamoid.included_models.reject { 
    
      def create_tables
        results = { created: [], existing: [] }
        # We can't quite rely on Dynamoid.included_models alone, we need to select only viable models
        Dynamoid.included_models.reject { |m| m.base_class.try(:name).blank? }.uniq(&:table_name).each do |model|
          if Dynamoid.adapter.list_tables.include? model.table_name
            results[:existing] << model.table_name
          else
            model.create_table(sync: true)
            results[:created] << model.table_name
          end
        end