code: def test_graph_object_input(engine, pretty):
      scatter = go.Scatter(x=[1, 2, 3], y=np.array([4, 5, 6]))
      result = pio.to_json_plotly(scatter, engine=engine)
      expected = """{"x":[1,2,3],"y":[4,5,6],"type":"scatter"}"""
      assert result == expected
      check_roundtrip(result, engine=engine, pretty=pretty)
  
imports: import pytest
  import plotly.io.json
  import plotly.graph_objects
  import plotly.express
  import numpy
  import pandas
  import json
  import datetime
  import re
  import sys
  import warnings
  from pytz import timezone
  from _plotly_utils.optional_imports import get_module
label_desc: Use image node_id 15 for calling a global function with example usage: test_graph_object_input(engine, pretty) without return types