code: def get_collator(collator_name, collate_params):
      """
      Given the collator name and the collator params, return the collator
      if registered with VISSL. Also supports pytorch default collators.
      """
      if collator_name == "default_collate":
          return default_collate
      else:
          assert collator_name in COLLATOR_REGISTRY, "Unknown collator"
          return partial(
              COLLATOR_REGISTRY[collator_name], **collate_params
          )
  
imports: from functools import partial
  from pathlib import Path
  from classy_vision.generic.registry_utils import import_all_modules
  from torch.utils.data.dataloader import default_collate
label_desc: Use image node_id 2 for calling a global function with example usage: get_collator(collator_name, collate_params) and returns: default_collate, partial