import importlib


def _get_attr(config, section):

    """
    parse config section, import module and return attr

    Args:
        config: ConfigParser object of the config file
        section: section name in the config file

    Returns:
        Module attribute

    """
    entrypoint = config.get(section, 'entrypoint')
    module, name = entrypoint.split(':')
    module = importlib.import_module(module)
    attr = getattr(module, name)

    return attr