code: def apply_proper_channels_last(flag, input_item):
      """
      This function will apply proper channes_last to
      input item. flag has 3 possible values:
  
      channel_last: "channel_last"
      channel_last_3d: "channel_last_3d"
      no change: "original"
      """
      if flag == "channels_last":
          return input_item.to(memory_format=torch.channels_last)
      if flag == "channels_last_3d":
          return input_item.to(memory_format=torch.channels_last_3d)
      return input_item
  
file_path: BigDL/python/nano/src/bigdl/nano/utils/pytorch/channel_last.py
imports: from typing import Optional
  from types import MethodType
  from logging import warning
  import torch
  import pytorch_lightning
label_desc: Use image node_id 2 for calling a global function with example usage: apply_proper_channels_last(flag, input_item) and returns: input_item, input_item, input_item