code: def test_ranges():
      fig = px.scatter(x=px.Range(), y=[1, 2], hover_data=[px.Range()])
      assert fig.data[0].x[0] == 0
      assert fig.data[0].x[1] == 1
      assert fig.data[0].customdata[0][0] == 0
      assert fig.data[0].customdata[1][0] == 1
      assert "x=" in fig.data[0].hovertemplate
  
      fig = px.scatter(x=px.Range(label="time"), y=[1, 2])
      assert fig.data[0].x[0] == 0
      assert fig.data[0].x[1] == 1
      assert "x=" not in fig.data[0].hovertemplate
      assert "time=" in fig.data[0].hovertemplate
  
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 31 for calling a global function with example usage: test_ranges() without return types