code: def test_cosine_basis_functions(batch_size, m, n_basis_functions):
      x = torch.rand(batch_size, m, dtype=torch.float)
      y = iqn.cosine_basis_functions(
          x, n_basis_functions=n_basis_functions
      )
      assert y.shape == (batch_size, m, n_basis_functions)
  
      for i in range(batch_size):
          for j in range(m):
              for k in range(n_basis_functions):
                  torch_assert_allclose(
                      y[i, j, k],
                      torch.cos(x[i, j] * (k + 1) * np.pi),
                      atol=1e-5,
                  )
  
imports: import basetest_dqn_like
  import numpy
  import pytest
  import torch
  from basetest_training import _TestBatchTrainingMixin
  from torch import nn
  import pfrl
  from pfrl.agents import iqn
  from pfrl.testing import torch_assert_allclose
label_desc: Use image node_id 2 for calling a global function with example usage: test_cosine_basis_functions(batch_size, m, n_basis_functions) without return types