code: def channel_shuffle(x: Tensor, groups: int) -> Tensor:
      batch_size, num_channels, height, width = x.size()
      channels_per_group = num_channels // groups
  
      # reshape
      # [batch_size, num_channels, height, width] -> [batch_size, groups, channels_per_group, height, width]
      x = x.view(batch_size, groups, channels_per_group, height, width)
  
      x = torch.transpose(x, 1, 2).contiguous()
  
      # flatten
      x = x.view(batch_size, -1, height, width)
  
      return x
  
file_path: deep-learning-for-image-processing/pytorch_classification/Test7_shufflenet/model.py
imports: from typing import List, Callable
  import torch
  from torch import Tensor
  import torch.nn
label_desc: Use image node_id 1 for calling a global function with example usage: channel_shuffle(x, groups) and returns: x