code: def test_skip_invalid(validator):
      val = dict(
          color="green",
          size=10,
          bogus=99,  # Bad property name
          colorbar={
              "bgcolor": "blue",
              "bogus_inner": 23,
          },  # Bad nested property name
          opacity="bogus value",  # Bad value for valid property
      )
  
      expected = dict(
          color="green", size=10, colorbar={"bgcolor": "blue"}
      )
  
      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 7 for calling a global function with example usage: test_skip_invalid(validator) without return types