code: def test_skip_invalid_empty_object(validator):
      val = dict(
          color="green",
          size=10,
          colorbar={
              "bgcolor": "bad_color",  # Bad value for valid property
              "bogus_inner": 23,  # Bad nested property name
          },
          opacity=0.5,  # Bad value for valid property
      )
  
      # The colorbar property should be absent, not None or {}
      expected = dict(color="green", size=10, opacity=0.5)
  
      res = validator.validate_coerce(val, skip_invalid=True)
      assert res.to_plotly_json() == expected
  
file_path: plotly.py/packages/python/plotly/_plotly_utils/tests/validators/test_compound_validator.py
imports: import pytest
  from _plotly_utils.basevalidators import CompoundValidator
  from plotly.graph_objs.scatter import Marker
label_desc: Use image node_id 8 for calling a global function with example usage: test_skip_invalid_empty_object(validator) without return types