def get_instance(module, name, config):
    """
    Get module indicated in config[name]['type'];
    If there are args to specify the module, specify in config[name]['args']
    """
    func_args = config[name]['args'] if 'args' in config[name] else None

    # if any argument specified in config[name]['args']
    if func_args:
        return getattr(module, config[name]['type'])(**func_args)
    # if not then just return the module
    return getattr(module, config[name]['type'])()