def initialize_engine_object(engine, endpoint, apikey=None, username=None,
    password=None):
    """
    Initialize a DatasetEngine object from a string that points at the engine class.
    """
    engine_split = engine.split('.')
    module_string = '.'.join(engine_split[:-1])
    engine_class_string = engine_split[-1]
    module = __import__(module_string, fromlist=[engine_class_string])
    EngineClass = getattr(module, engine_class_string)
    engine_instance = EngineClass(endpoint=endpoint, apikey=apikey,
        username=username, password=password)
    return engine_instance
