code: def test_from_json_skip_invalid(fig1):
      dict1 = fig1.to_dict()
  
      # Set bad property name
      dict1["data"][0]["marker"]["bogus"] = 123
  
      # Set property with bad value
      dict1["data"][0]["marker"]["size"] = -1
  
      # Serialize to json
      bad_json = json.dumps(dict1, **opts)
      fig1_loaded = pio.from_json(bad_json, skip_invalid=True)
  
      # Check loaded figure
      assert pio.to_json(fig1_loaded) == pio.to_json(fig1.to_dict())
  
imports: import plotly.graph_objs
  import plotly.io
  import pytest
  import plotly
  import json
  import os
  import tempfile
  from unittest.mock import MagicMock
  from pathlib import Path
label_desc: Use image node_id 10 for calling a global function with example usage: test_from_json_skip_invalid(fig1) without return types