import importlib


def get_attribute(module_name: str, attribute_name: str):
    """
    Get the specified module attribute. It most cases, it will be a class or function.

    :param module_name: module name
    :param attribute_name: attribute name
    :return: module attribute
    """
    assert isinstance(module_name, str)
    assert isinstance(attribute_name, str)

    _module = importlib.import_module(module_name)
    return getattr(_module, attribute_name)