def METHOD_NAME(test_name, params, results, *args):
    params = str(params)
    tols = (1e-13, 1e-13)
    keys = {}
    for arg in args:
        if isinstance(arg, tuple):
            assert len(arg) == 2
            tols = arg
        else:
            keys[arg] = tols
    assert results is not None
    assert set(keys.keys()) <= set(results.keys()), \
        f'Keys {set(keys.keys()) - set(results.keys())} missing in results dict'
    results = {k: np.asarray(results[k]) for k in keys.keys()}
    assert all(v.dtype != object for v in results.values())
    basepath = importlib_resources.files('pymortests') / 'testdata/check_results'
    testname_dir = basepath / test_name
    arg_id = hashlib.sha1(params.encode()).hexdigest()
    filename = testname_dir / arg_id
    def _dump_results(fn, res):
        with fn.open('wb') as f:
            f.write((params + '\n').encode())
            res = {k: v.tolist() for k, v in res.items()}
            dump(res, f, protocol=2)
    try:
        with filename.open('rb') as f:
            f.readline()
            old_results = load(f)
    except FileNotFoundError:
        if not testname_dir.exists():
            testname_dir.mkdir()
        _dump_results(filename, results)
        raise NoResultDataError(msg=f'No results found for test {test_name} ({params}), saved current results.'
                                        f'Remember to check in {filename}.')
    for k, (atol, rtol) in keys.items():
        if not np.all(np.allclose(old_results[k], results[k], atol=atol, rtol=rtol)):
            abs_errs = np.abs(results[k] - old_results[k])
            rel_errs = abs_errs / np.abs(old_results[k])
            filename_changed = testname_dir / f'{arg_id}_changed'
            _dump_results(filename_changed, results)
            assert False, (f'Results for test {test_name}({params}, key: {k}) have changed.\n'
                           f'(maximum error: {np.max(abs_errs)} abs / {np.max(rel_errs)} rel).\n'
                           f'Saved new results in {filename_changed}')