def METHOD_NAME(
    simulation_1d, exclude_particle_reservoir
):  # pylint: disable=too-many-locals
    # Arrange
    data = simulation_1d[0].attributes
    settings = simulation_1d[1]
    z0 = 0.0 if exclude_particle_reservoir else -settings.particle_reservoir_depth
    exported_particles_indexes = {}
    number_of_exported_particles = []
    for i, t in enumerate(settings.save_spec_and_attr_times):
        exported_particles_indexes[t] = np.where(
            data["cell origin"][i][0]
            >= int((z0 + settings.particle_reservoir_depth) / settings.dz)
        )
        number_of_exported_particles.append(exported_particles_indexes[t][0].size)
    # Act
    with TemporaryDirectory() as tmpdir_:
        tmpdir = tmpdir_ + "/"
        vtk_exporter = VTKExporter_1d(
            data,
            settings,
            path=tmpdir,
            exclude_particle_reservoir=exclude_particle_reservoir,
        )
        vtk_exporter.run()
        written_files_list = os.listdir(tmpdir)
        data_from_file = {}
        for t in settings.save_spec_and_attr_times:
            leading_zeros_in_filename = [
                "0" for i in range(len(str(settings.t_max)) - len(str(t)))
            ]
            filename = "time" + "".join(leading_zeros_in_filename) + str(t) + ".vtu"
            data_from_file[t] = readVTK_1d(tmpdir + filename)
    # Assert
    for i, t in enumerate(settings.save_spec_and_attr_times):
        filename_leading_zeros = "".join(
            ["0" for i in range(len(str(settings.t_max)) - len(str(t)))]
        )
        filename = "time" + filename_leading_zeros + str(t) + ".vtu"
        assert filename in written_files_list
        assert z0 <= np.amin(data_from_file[t]["z"])
        assert np.amax(data_from_file[t]["z"]) <= settings.z_max
        assert data_from_file[t]["z"].size == number_of_exported_particles[i]
        data_from_file[t].pop("z")
        assert data.keys() == data_from_file[t].keys()
        assert (
            data["radius"][i][exported_particles_indexes[t]].mean()
            == data_from_file[t]["radius"].mean()
        )