code: def test_supplied_yref_on_non_subplot_figure_object():
      ### test a non-subplot figure object from go.Figure
      trace1 = go.Scatter(x=[1, 2, 3, 4], y=[1, 2, 2, 1])
      trace2 = go.Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1], yaxis="y2")
      data = [trace1, trace2]
      layout = go.Layout(
          yaxis=dict(title="yaxis1 title"),
          yaxis2=dict(
              title="yaxis2 title", overlaying="y", side="right"
          ),
      )
      fig = go.Figure(data=data, layout=layout)
      # add horizontal line on y2. Secondary_y can be True or False when yref is supplied
      fig.add_hline(y=3, yref="y2", secondary_y=False)
      assert fig.layout["shapes"][0]["yref"] == "y2"
  
imports: import types
  from unittest import TestCase
  import plotly.graph_objs
  from plotly.subplots import make_subplots
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_supplied_yref_on_non_subplot_figure_object() without return types