code: def test_can_cast_safely_same_kind():
      # 'i' -> 'i'
      data = cudf.Series([1, 2, 3], dtype="int32")._column
      to_dtype = np.dtype("int64")
  
      assert data.can_cast_safely(to_dtype)
  
      data = cudf.Series([1, 2, 3], dtype="int64")._column
      to_dtype = np.dtype("int32")
  
      assert data.can_cast_safely(to_dtype)
  
      data = cudf.Series([1, 2, 2**31], dtype="int64")._column
      assert not data.can_cast_safely(to_dtype)
  
      # 'u' -> 'u'
      data = cudf.Series([1, 2, 3], dtype="uint32")._column
      to_dtype = np.dtype("uint64")
  
      assert data.can_cast_safely(to_dtype)
  
      data = cudf.Series([1, 2, 3], dtype="uint64")._column
      to_dtype = np.dtype("uint32")
  
      assert data.can_cast_safely(to_dtype)
  
      data = cudf.Series([1, 2, 2**33], dtype="uint64")._column
      assert not data.can_cast_safely(to_dtype)
  
      # 'f' -> 'f'
      data = cudf.Series([np.inf, 1.0], dtype="float64")._column
      to_dtype = np.dtype("float32")
      assert data.can_cast_safely(to_dtype)
  
      data = cudf.Series(
          [np.finfo("float32").max * 2, 1.0], dtype="float64"
      )._column
      to_dtype = np.dtype("float32")
      assert not data.can_cast_safely(to_dtype)
  
imports: import numpy
  import pandas
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_150
  from cudf.testing._utils import NUMERIC_TYPES, assert_eq
  from cudf.utils.dtypes import np_dtypes_to_pandas_dtypes
label_desc: Use image node_id 1 for calling a global function with example usage: test_can_cast_safely_same_kind() without return types