code: def test_rejection_element_attr(validator):
      val = [dict(type="scatter", bogus=99)]
  
      with pytest.raises(ValueError) as validation_failure:
          validator.validate_coerce(val)
  
      assert (
          "Invalid property specified for object of type "
          + "plotly.graph_objs.Scatter: 'bogus'"
          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 8 for calling a global function with example usage: test_rejection_element_attr(validator) without return types