code: def test_dtype_conversion():
      v = nn.Variable([2, 3, 4])
      a = v.data.cast(np.int64)
      a[...] = 2
      assert v.data.dtype == np.int64
      assert np.all(a == 2)
      b = v.data.cast(np.float32)
      assert b.dtype == np.float32
      assert b is not a
      assert np.all(b == 2)
      b[...] = np.random.randn(*b.shape) * 10
      c = v.data.cast(np.int32)
      assert np.all(c == b.astype(np.int32))
  
imports: import pytest
  import numpy
  import nnabla
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 4 for calling a global function with example usage: test_dtype_conversion() without return types