code: def build_collate_fn(opts, *args, **kwargs):
      collate_fn_name_train = getattr(
          opts, "dataset.collate_fn_name_train"
      )
  
      if collate_fn_name_train is None:
          logger.error(
              "Please specify collate function for training dataset using "
              "--dataset.collate-fn-name-train"
          )
  
      collate_fn_name_val = getattr(opts, "dataset.collate_fn_name_val")
      if collate_fn_name_val is None:
          logger.error(
              "Please specify collate function for training dataset using "
              "--dataset.collate-fn-name-val"
          )
  
      collate_fn_train = COLLATE_FN_REGISTRY[collate_fn_name_train]
      collate_fn_val = COLLATE_FN_REGISTRY[collate_fn_name_val]
      return collate_fn_train, collate_fn_val
  
imports: import argparse
  from utils import logger
  from utils.registry import Registry
label_desc: Use image node_id 2 for calling a global function with example usage: build_collate_fn(opts) and returns: collate_fn_train,  collate_fn_val