code: def pack_pathway_output(cfg, frames):
      """
      Prepare output as a list of tensors. Each tensor corresponding to a
      unique pathway.
      Args:
          frames (tensor): frames of images sampled from the video. The
              dimension is `channel` x `num frames` x `height` x `width`.
      Returns:
          frame_list (list): list of tensors with the dimension of
              `channel` x `num frames` x `height` x `width`.
      """
      if cfg.DATA.REVERSE_INPUT_CHANNEL:
          frames = frames[[2, 1, 0], :, :, :]
      if cfg.MODEL.ARCH in cfg.MODEL.SINGLE_PATHWAY_ARCH:
          frame_list = [frames]
      elif cfg.MODEL.ARCH in cfg.MODEL.MULTI_PATHWAY_ARCH:
          fast_pathway = frames
          # Perform temporal sampling from the fast pathway.
          slow_pathway = torch.index_select(
              frames,
              1,
              torch.linspace(
                  0,
                  frames.shape[1] - 1,
                  frames.shape[1] // cfg.SLOWFAST.ALPHA,
              ).long(),
          )
          frame_list = [slow_pathway, fast_pathway]
      else:
          raise NotImplementedError(
              "Model arch {} is not in {}".format(
                  cfg.MODEL.ARCH,
                  cfg.MODEL.SINGLE_PATHWAY_ARCH
                  + cfg.MODEL.MULTI_PATHWAY_ARCH,
              )
          )
      return frame_list
  
imports: import logging
  import numpy
  import os
  import random
  import time
  from collections import defaultdict
  import cv2
  import torch
  from torch.utils.data.distributed import DistributedSampler
  from torchvision import transforms
  from slowfast.utils.env import pathmgr
  from .None import transform
  from .random_erasing import RandomErasing
  from .transform import create_random_augment
label_desc: Use image node_id 3 for calling a global function with example usage: pack_pathway_output(cfg, frames) and returns: frame_list