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