import importlib


def build(db_type, config={}):
  """
  Creates and initializes the appropriate store based on the 'db_type'. The 'config' structure varies by
  implementation.
  """

  module = importlib.import_module('..db_impl.' + db_type, package=__name__)
  return module.DB(**config)
