code: def transform_model_input_data_type(model_input, input_type: str):
      """
      Default model input follow RGB format. Based the model input specified,
      change the type. Supported types: RGB, BGR, LAB
      """
      model_output = model_input
      # In case the model takes BGR input type, we convert the RGB to BGR
      if input_type == "bgr":
          model_output = model_input[:, [2, 1, 0], :, :]
      # In case of LAB image, we take only "L" channel as input. Split the data
      # along the channel dimension into [L, AB] and keep only L channel.
      if input_type == "lab":
          model_output = torch.split(model_input, [1, 2], dim=1)[0]
      return model_output
  
imports: import logging
  import math
  import warnings
  from enum import Enum
  from typing import Dict, List, Tuple
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  from torch.nn.modules.utils import _ntuple
  from torch.utils.checkpoint import checkpoint
  from vissl.data.collators.collator_helper import MultiDimensionalTensor
  from vissl.utils.activation_checkpointing import checkpoint_trunk
  from vissl.utils.env import get_machine_local_and_dist_rank
  from vissl.utils.misc import is_apex_available
label_desc: Use image node_id 1 for calling a global function with example usage: transform_model_input_data_type(model_input, input_type) and returns: model_output