def _get_configured_module(option_name, known_modules=None):
    """Get the module specified by the value of option_name. The value of the
    configuration option will be used to load the module by name from the known
    module list or treated as a path if not found in known_modules.
    Args:
        option_name: name of persistence module
        known_modules: dictionary of module names and module paths,
            ie: {'ndb':'furious.extras.appengine.ndb_persistence'}
    Returns:
        module of the module path matching the name in known_modules
    """
    from furious.job_utils import path_to_reference

    config = get_config()
    option_value = config[option_name]

    # If no known_modules were give, make it an empty dict.
    if not known_modules:
        known_modules = {}

    module_path = known_modules.get(option_value) or option_value
    return path_to_reference(module_path)