code: def test_interval_to_arrow():
      expect = pa.Array.from_pandas(
          pd.IntervalIndex([pd.Interval(0, 1)])
      )
      got = cudf.IntervalIndex([pd.Interval(0, 1)]).to_arrow()
      assert_eq(expect, got)
  
imports: import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_210
  from cudf.core.index import IntervalIndex, interval_range
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 2 for calling a global function with example usage: test_interval_to_arrow() without return types