import importlib


def _import_package(area):
    """Import the right area package."""
    root_import = 'esmvaltool.diag_scripts.autoassess.'
    available_areas = [
        'monsoon', 'stratosphere', 'hydrocycle', 'conservation', 'globaltrop',
        'land_surface_surfrad', 'land_surface_snow',
        'land_surface_soilmoisture', 'land_surface_permafrost'
    ]
    if area in available_areas:
        module = root_import + area
        area_package = importlib.import_module(module)
        return area_package
    else:
        raise Exception('Unknown area: ' + area)