code: def get_data_per_category(data):
      data_per_category = defaultdict(list)
      for item in data:
          category = item["category"]
          data_per_category[category].append(item)
  
      return data_per_category
  
file_path: ColossalAI/applications/ColossalEval/colossal_eval/dataset/colossalai.py
imports: from collections import defaultdict
  from copy import deepcopy
  from typing import Dict, List
  from colossal_eval.utils import jload
  from colossalai.logging import DistributedLogger
  from .base import BaseDataset
label_desc: Use image node_id 1 for calling a global function with example usage: get_data_per_category(data) and returns: data_per_category