code: def wrap_collate(collate):
      """:func:`flash.data.utilities.collate.wrap_collate` is a utility that can be used to wrap an existing collate
      function to handle the metadata separately from the rest of the batch (giving a list of the metadata from the
      samples in the output).
  
      Args:
          collate: The collate function to wrap.
  
      Returns:
          The wrapped collate function.
  
      """
      return functools.partial(_wrap_collate, collate)
  
imports: import functools
  from typing import Any, Callable, List, Mapping
  from torch.utils.data._utils.collate import default_collate
  from flash.core.data.io.input import DataKeys
label_desc: Use image node_id 2 for calling a global function with example usage: wrap_collate(collate) and returns: functools