code: def test_duration_raises():
      td = pd.timedelta_range(0, periods=3, freq="h")
      df = pd.DataFrame(td).reset_index()
      df.columns = ["id", "timedelta"]
      pa_table = pa.table(df)
      with pytest.raises(ValueError) as e:
          to_values(pa_table)
  
      # Check that exception mentions the duration[ns] type,
      # which is what the pandas timedelta is converted into
      assert "duration[ns]" in e.value.args[0]
  
file_path: altair/tests/utils/test_dataframe_interchange.py
imports: from datetime import datetime
  import pandas
  import pytest
  import sys
  import os
  from altair.utils.data import to_values
label_desc: Use image node_id 3 for calling a global function with example usage: test_duration_raises() without return types