code: def test_calculate_norms():
      num_items = 100
      factors = 8
      items = (
          np.arange(num_items * factors)
          .reshape((num_items, factors))
          .astype("float32")
      )
      norms = (
          implicit.gpu._cuda.calculate_norms(
              implicit.gpu._cuda.Matrix(items)
          )
          .to_numpy()
          .reshape(num_items)
      )
      np_norms = np.linalg.norm(items, axis=1)
      assert_allclose(norms, np_norms)
  
file_path: implicit/tests/gpu_test.py
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from recommender_base_test import get_checker_board
  import implicit
label_desc: Use image node_id 4 for calling a global function with example usage: test_calculate_norms() without return types