def METHOD_NAME(raw_file, sonar_model, use_swap, ek60_path):
    """Tests for memory expansion relief"""
    import os
    from tempfile import TemporaryDirectory
    from echopype.echodata.echodata import EchoData
    name = os.path.basename(raw_file).replace('.raw', '')
    fname = f"{name}__{use_swap}.zarr"
    file_path = ek60_path / raw_file
    echodata = open_raw(
        raw_file=file_path,
        sonar_model=sonar_model,
        use_swap=use_swap
    )
    # Most likely succeed if it doesn't crash
    assert isinstance(echodata, EchoData)
    with TemporaryDirectory() as tmpdir:
        output_save_path = os.path.join(tmpdir, fname)
        echodata.to_zarr(output_save_path)
        # If it goes all the way to here it is most likely successful
        assert os.path.exists(output_save_path)
    if use_swap:
        # create a copy of zarr_file_name. The join is necessary so that we are not referencing zarr_file_name
        temp_zarr_path = ''.join(echodata.parsed2zarr_obj.zarr_file_name)
        del echodata
        # make sure that the temporary zarr was deleted
        assert Path(temp_zarr_path).exists() is False