code: def rgb2ycbcr(input_tensor):
      # Conversion from RGB to YCbCr according to
      # https://en.wikipedia.org/wiki/YCbCr?section=6#JPEG_conversion
      # Expecting batch of RGB images with values in [0, 255]
  
      kr = 0.299
      kg = 0.587
      kb = 0.114
  
      # Expecting batch of image sequence inputs with values in [0, 255]
      r = input_tensor[:, 0, :, :, :]
      g = input_tensor[:, 1, :, :, :]
      b = input_tensor[:, 2, :, :, :]
  
      y = torch.unsqueeze(kr * r + kg * g + kb * b, 1)
      cb = torch.unsqueeze(
          128 - (0.1687346 * r) - (0.331264 * g) + (0.5 * b), 1
      )
      cr = torch.unsqueeze(
          128 + (0.5 * r) - (0.418688 * g) - (0.081312 * b), 1
      )
  
      return y, cb, cr
  
file_path: DALI/docs/examples/use_cases/video_superres/model/model.py
imports: import time
  import scipy.misc
  import numpy
  from math import floor, log
  import torch
  import torch.nn
  from torch.nn import init
  from torch.autograd import Variable
  from torch.nn.functional import upsample
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: rgb2ycbcr(input_tensor) and returns: y,  cb,  cr