import importlib


def get_model_class(model_string):
    """
    Get Model Class from string.
    :param model_string: String by ModelClass
    :return: ModelClass
    """
    module_name = model_string.split(".")[:-1]
    module_name = ".".join(module_name)
    model_name = model_string.split(".")[-1:]
    model_name = ".".join(model_name)

    module = importlib.import_module(module_name)
    model = getattr(module, model_name)
    return model