code: def transform_multiple_input_dataloader_to_inc_mode(
      model, dataloader
  ):
      (
          need_transformation,
          forward_args_len,
      ) = _need_dataloader_type_transformation(model, dataloader)
      if need_transformation:
          # define a decorator to change multiple inputs to 2 items
          def tuple_collate_fn_wrapper(func, forward_args_len):
              def collate_fn(batch):
                  res = func(batch)
                  if len(res) - forward_args_len == 1:
                      # if only one y is provided
                      return tuple(res[:forward_args_len]), res[-1]
                  else:
                      # if multiple y are provided
                      return tuple(res[:forward_args_len]), tuple(
                          res[forward_args_len:]
                      )
  
              return collate_fn
  
          # deepcopy the dataloader so that the transformation will not pollute the original one
          new_dataloader = deepcopy(dataloader)
  
          # add collate fn to the dataloader
          new_dataloader.collate_fn = tuple_collate_fn_wrapper(
              new_dataloader.collate_fn, forward_args_len
          )
  
          return new_dataloader
      return dataloader
  
file_path: BigDL/python/nano/src/bigdl/nano/utils/pytorch/dataloader.py
imports: from typing import Sequence
  from copy import deepcopy
  import torch
  import warnings
  from bigdl.nano.utils.pytorch import get_conditional_args
label_desc: Use image node_id 1 for calling a global function with example usage: transform_multiple_input_dataloader_to_inc_mode(model, dataloader) and returns: dataloader, new_dataloader, collate_fn, tuple,  res, tuple,  tuple