code: def test_rejection(val, validator):
      with pytest.raises(ValueError) as validation_failure:
          validator.validate_coerce(val)
  
      assert "read-only" in str(validation_failure.value)
  
imports: import pytest
  from _plotly_utils.basevalidators import LiteralValidator
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: test_rejection(val, validator) without return types