code: def test_check_option():
      """Test checking the value of a parameter against a list of options."""
      allowed_values = ["valid", "good", "ok"]
  
      # Value is allowed
      assert _check_option("option", "valid", allowed_values)
      assert _check_option("option", "good", allowed_values)
      assert _check_option("option", "ok", allowed_values)
      assert _check_option("option", "valid", ["valid"])
  
      # Check error message for invalid value
      msg = (
          "Invalid value for the 'option' parameter. Allowed values are "
          "'valid', 'good', and 'ok', but got 'bad' instead."
      )
      with pytest.raises(ValueError, match=msg):
          assert _check_option("option", "bad", allowed_values)
  
      # Special error message if only one value is allowed
      msg = (
          "Invalid value for the 'option' parameter. The only allowed value "
          "is 'valid', but got 'bad' instead."
      )
      with pytest.raises(ValueError, match=msg):
          assert _check_option("option", "bad", ["valid"])
  
imports: import os
  import sys
  from pathlib import Path
  import numpy
  import pytest
  import mne
  from mne import pick_channels_cov, read_vectorview_selection
  from mne._fiff.pick import _picks_to_idx
  from mne.datasets import testing
  from mne.utils import Bunch, _check_ch_locs, _check_fname, _check_info_inv, _check_option, _check_range, _check_sphere, _check_subject, _on_missing, _path_like, _safe_input, _suggest, _validate_type, catch_logging, check_fname, check_random_state, check_version
label_desc: Use image node_id 5 for calling a global function with example usage: test_check_option() without return types