code: def test_openfoamreader_active_time():
      # vtk < 9.1.0 does not support
      if pv.vtk_version_info < (9, 1, 0):
          pytest.xfail(
              "OpenFOAMReader GetTimeValue missing on vtk<9.1.0"
          )
  
      reader = get_cavity_reader()
      assert reader.active_time_value == 0.0
      reader.set_active_time_point(1)
      assert reader.active_time_value == 0.5
      reader.set_active_time_value(1.0)
      assert reader.active_time_value == 1.0
  
      with pytest.raises(
          ValueError,
          match=r"Not a valid .* time values: \[0.0, 0.5, 1.0, 1.5, 2.0, 2.5\]",
      ):
          reader.set_active_time_value(1000)
  
imports: import os
  import platform
  import numpy
  import pytest
  import pyvista
  from pyvista import examples
  from pyvista.core.utilities.fileio import _try_imageio_imread
  from pyvista.examples.downloads import download_file
label_desc: Use image node_id 28 for calling a global function with example usage: test_openfoamreader_active_time() without return types