code: def test_cast_int_to_float():
      # GH-34901
      int_scalar = pa.scalar(18014398509481983, type=pa.int64())
      unsafe_cast = int_scalar.cast(pa.float64(), safe=False)
      expected_unsafe_cast = pa.scalar(
          18014398509481983.0, type=pa.float64()
      )
      assert unsafe_cast == expected_unsafe_cast
      with pytest.raises(pa.ArrowInvalid):
          int_scalar.cast(pa.float64())
  
imports: import datetime
  import decimal
  import pytest
  import sys
  import weakref
  import numpy
  import pyarrow
  import pyarrow.compute
  from pyarrow.tests import util
label_desc: Use image node_id 19 for calling a global function with example usage: test_cast_int_to_float() without return types