code: def transform(in_data):
      img, label = in_data
      if np.random.rand() > 0.5:
          img = img[:, :, ::-1]
          label = label[:, ::-1]
      return img, label
  
file_path: chainercv/examples/segnet/train.py
imports: import argparse
  from collections import defaultdict
  import os
  import chainer
  import numpy
  from chainer.dataset import concat_examples
  from chainer.datasets import TransformDataset
  from chainer import iterators
  from chainer import optimizers
  from chainer import training
  from chainer.training import extensions
  from chainercv.datasets import camvid_label_names
  from chainercv.datasets import CamVidDataset
  from chainercv.extensions import SemanticSegmentationEvaluator
  from chainercv.links import PixelwiseSoftmaxClassifier
  from chainercv.links import SegNetBasic
label_desc: Use image node_id 2 for calling a global function with example usage: transform(in_data) and returns: img,  label