code: def test_from_json_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)
  
      with pytest.raises(ValueError):
          pio.from_json(bad_json)
  
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 9 for calling a global function with example usage: test_from_json_invalid(fig1) without return types