code: def apply_batch_tfms(
      build_batch, batch_tfms=None, **build_batch_kwargs
  ):
      """This decorator function applies batch_tfms to records before passing them to build_batch"""
  
      def inner(records):
          if batch_tfms is not None:
              records = batch_tfms(records)
          return build_batch(records, **build_batch_kwargs)
  
      return inner
  
file_path: icevision/icevision/models/utils.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.core import *
  from icevision.data import *
  from icevision.parsers import *
  from icevision.data.dataset import Dataset
label_desc: Use image node_id 5 for calling a global function with example usage: apply_batch_tfms(build_batch, batch_tfms) and returns: inner, build_batch