code: def test_rounding_routines(func, xp, device, input, dtypes):
      (in_dtype,), out_dtype = dtypes
      a = xp.array(input.astype(in_dtype))
      a = func(xp, a)
      a = dtype_utils.cast_if_numpy_array(xp, a, out_dtype)
      return a
  
imports: import numpy
  import pytest
  import chainerx
  import chainerx.testing
  from chainerx_tests import dtype_utils
  from chainerx_tests import math_utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_rounding_routines(func, xp, device, input, dtypes) and returns: a