code: def test_dct(shape):
      x = torch.randn(shape)
      actual = dct(x)
      expected = torch.from_numpy(fftpack.dct(x.numpy(), norm="ortho"))
      assert_close(actual, expected)
  
imports: import math
  import numpy
  import pytest
  import scipy.fftpack
  import torch
  import pyro
  from pyro.ops.tensor_utils import block_diag_embed, block_diagonal, convolve, dct, idct, next_fast_len, periodic_cumsum, periodic_features, periodic_repeat, precision_to_scale_tril, repeated_matmul
  from tests.common import assert_close, assert_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_dct(shape) without return types