code: def test_cast_float_to_int():
      # GH-35040
      float_scalar = pa.scalar(1.5, type=pa.float64())
      unsafe_cast = float_scalar.cast(pa.int64(), safe=False)
      expected_unsafe_cast = pa.scalar(1, type=pa.int64())
      assert unsafe_cast == expected_unsafe_cast
      with pytest.raises(pa.ArrowInvalid):
          float_scalar.cast(pa.int64())
  
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 18 for calling a global function with example usage: test_cast_float_to_int() without return types