code: def beans_collator(batch):
      return {
          "pixel_values": torch.cat(
              [data["pixel_values"] for data in batch], dim=0
          ),
          "labels": torch.tensor(
              [data["labels"] for data in batch], dtype=torch.int64
          ),
      }
  
file_path: colossalai/examples/images/vit/data.py
imports: import torch
  from datasets import load_dataset
  from torch.utils.data import Dataset
label_desc: Use image node_id 1 for calling a global function with example usage: beans_collator(batch) and returns: dict