code: def test_build_df_with_index():
      tips = px.data.tips()
      args = dict(data_frame=tips, x=tips.index, y="total_bill")
      out = build_dataframe(args, go.Scatter)
      assert_frame_equal(
          tips.reset_index()[out["data_frame"].columns],
          out["data_frame"],
      )
  
imports: import plotly.express
  import plotly.graph_objects
  import numpy
  import pandas
  import pytest
  from packaging import version
  import unittest.mock
  from plotly.express._core import build_dataframe
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 17 for calling a global function with example usage: test_build_df_with_index() without return types