def read_region(config, *args, **kwargs):
    """Snip-out target regions from nc4 file

    Quick and dirty hax to reduce the size of data read in from netCDF files.
    Keeps a memory leak in the module from blowing up the script. Not
    the best way to handle this.

    Parameters
    ----------
    config : dict
        Run configuration dictionary. Used to parse out target regions.
    *args :
        Passed on to read().
    **kwargs :
        Passed on to read().

    Returns
    -------
    years : array-like
    regions : array-like
    data : array-like
    """
    years, regions, data = read(*args, **kwargs)

    if configs.is_allregions(config):
        regions_msk = np.ones(regions.shape, dtype='bool')
    else:
        target_regions = configs.get_regions(config, regions)
        regions_msk = np.isin(regions, target_regions)

    return years, regions[regions_msk], data[..., regions_msk]