import importlib


def get_dataset(name, base_dir=None):
  """Imports the given dataset and returns an instance of it."""
  lib = importlib.import_module("..datasets.%s.dataset" % name, __name__)
  return lib.get_dataset(base_dir)