code: def test_sum_of_squares(dtype, nelem):
      dtype = cudf.dtype(dtype).type
      data = gen_rand(dtype, nelem)
      sr = Series(data)
      df = cudf.DataFrame(sr)
  
      got = (sr**2).sum()
      got_df = (df**2).sum()
      expect = (data**2).sum()
  
      if cudf.dtype(dtype).kind in {"u", "i"}:
          if 0 <= expect <= np.iinfo(dtype).max:
              np.testing.assert_array_almost_equal(expect, got)
              np.testing.assert_array_almost_equal(
                  expect, got_df.iloc[0]
              )
          else:
              print("overflow, passing")
      else:
          np.testing.assert_approx_equal(
              expect, got, significant=accuracy_for_dtype[dtype]
          )
          np.testing.assert_approx_equal(
              expect,
              got_df.iloc[0],
              significant=accuracy_for_dtype[dtype],
          )
  
imports: from decimal import Decimal
  from itertools import product
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf import Series
  from cudf.core.dtypes import Decimal32Dtype, Decimal64Dtype, Decimal128Dtype
  from cudf.testing import _utils
  from cudf.testing._utils import NUMERIC_TYPES, assert_eq, expect_warning_if, gen_rand
label_desc: Use image node_id 6 for calling a global function with example usage: test_sum_of_squares(dtype, nelem) without return types