def METHOD_NAME(x, groups):
    (batchsize, num_channels, height, width) = x.data.shape
    channels_per_group = (num_channels // groups)
    x = jt.reshape(x, [batchsize, groups, channels_per_group, height, width])
    x = jt.transpose(x, (0,2,1,3,4))
    x = jt.reshape(x, [batchsize, (- 1), height, width])
    return x