code: def test_lines_data():
      fig, ax = plt.subplots()
      ax.plot(D["x1"], D["y1"])
      ax.plot(D["x2"], D["y2"])
      renderer = run_fig(fig)
      for xi, xf, yi, yf in zip(
          renderer.plotly_fig["data"][0]["x"],
          D["x1"],
          renderer.plotly_fig["data"][0]["y"],
          D["y1"],
      ):
          assert xi == xf, (
              str(renderer.plotly_fig["data"][0]["x"])
              + " is not "
              + str(D["x1"])
          )
          assert yi == yf, (
              str(renderer.plotly_fig["data"][0]["y"])
              + " is not "
              + str(D["y1"])
          )
      for xi, xf, yi, yf in zip(
          renderer.plotly_fig["data"][1]["x"],
          D["x2"],
          renderer.plotly_fig["data"][1]["y"],
          D["y2"],
      ):
          assert xi == xf, (
              str(renderer.plotly_fig["data"][1]["x"])
              + " is not "
              + str(D["x2"])
          )
          assert yi == yf, (
              str(renderer.plotly_fig["data"][0]["y"])
              + " is not "
              + str(D["y2"])
          )
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_optional/test_matplotlylib/test_data.py
imports: import pytest
  from plotly import optional_imports
  from plotly.tests.test_optional.optional_utils import run_fig
  from plotly.tests.test_optional.test_matplotlylib.data.data import *
label_desc: Use image node_id 2 for calling a global function with example usage: test_lines_data() without return types