code: def test_rejection_element_tracetype(validator):
      val = [dict(type="bogus", a=4)]
  
      with pytest.raises(ValueError) as validation_failure:
          validator.validate_coerce(val)
  
      assert "Invalid element(s)" in str(validation_failure.value)
  
file_path: plotly.py/packages/python/plotly/_plotly_utils/tests/validators/test_basetraces_validator.py
imports: import pytest
  from _plotly_utils.basevalidators import BaseDataValidator
  from plotly.graph_objs import Scatter, Bar, Box
label_desc: Use image node_id 9 for calling a global function with example usage: test_rejection_element_tracetype(validator) without return types