code: def test_scalar_roundtrip(value):
      s = cudf.Scalar(value)
  
      assert s._is_host_value_current
      assert not s._is_device_value_current
  
      # call this property to sync the scalar
      s.device_value
  
      assert s._is_host_value_current
      assert s._is_device_value_current
  
      # invalidate the host cache
      s._host_value = None
      s._host_dtype = None
  
      assert not s._is_host_value_current
      assert s._is_device_value_current
  
      # this should trigger a host copy
  
      assert s.value == value or np.isnan(s.value) and np.isnan(value)
  
imports: import datetime
  import re
  from decimal import Decimal
  import numpy
  import pandas
  import pyarrow
  import pytest
  import rmm
  import cudf
  from cudf._lib.copying import get_element
  from cudf.testing._utils import ALL_TYPES, DATETIME_TYPES, NUMERIC_TYPES, TIMEDELTA_TYPES
label_desc: Use image node_id 5 for calling a global function with example usage: test_scalar_roundtrip(value) without return types