code: def test_pixelshuffle3d():
      nchan = 1
      up_x = 2
      up_y = 1
      up_z = 2
      nx = 2
      ny = 3
      nz = 4
      shape_before = (1, nchan * up_x * up_y * up_z, nx, ny, nz)
      shape_after = (1, nchan, nx * up_x, ny * up_y, nz * up_z)
      layer = nn.PixelShuffle3D((up_x, up_y, up_z))
      x = mx.np.arange(_np.prod(shape_before)).reshape(shape_before)
      y = layer(x)
      assert y.shape == shape_after
      # - Channels are reshaped to form 2x1x2 blocks
      # - Within each block, the increment is `nx * ny * nz` when increasing the
      #   column index by 1, e.g. the block [[[ 0, 24]], [[48, 72]]]
      # - Increasing the block index adds an offset of 1
      assert_allclose(
          y,
          [
              [
                  [
                      [
                          [0, 24, 1, 25, 2, 26, 3, 27],
                          [4, 28, 5, 29, 6, 30, 7, 31],
                          [8, 32, 9, 33, 10, 34, 11, 35],
                      ],
                      [
                          [48, 72, 49, 73, 50, 74, 51, 75],
                          [52, 76, 53, 77, 54, 78, 55, 79],
                          [56, 80, 57, 81, 58, 82, 59, 83],
                      ],
                      [
                          [12, 36, 13, 37, 14, 38, 15, 39],
                          [16, 40, 17, 41, 18, 42, 19, 43],
                          [20, 44, 21, 45, 22, 46, 23, 47],
                      ],
                      [
                          [60, 84, 61, 85, 62, 86, 63, 87],
                          [64, 88, 65, 89, 66, 90, 67, 91],
                          [68, 92, 69, 93, 70, 94, 71, 95],
                      ],
                  ]
              ]
          ],
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  import os
  from uuid import uuid4
  import numpy
  import mxnet
  from mxnet import gluon, autograd, np, npx
  from mxnet.test_utils import use_np, assert_almost_equal, check_gluon_hybridize_consistency, assert_allclose
  from mxnet.gluon import nn
  from mxnet.base import MXNetError
  import random
  import pytest
label_desc: Use image node_id 25 for calling a global function with example usage: test_pixelshuffle3d() without return types