code: def aggregation_func(x, num_per_row):
      zero_denom = num_per_row == 0
      x = torch.sum(x, dim=1) / num_per_row
      x[zero_denom] = 0
      return x
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/reducers/per_anchor_reducer.py
imports: import torch
  from ..utils import common_functions
  from .base_reducer import BaseReducer
  from .mean_reducer import MeanReducer
label_desc: Use image node_id 1 for calling a global function with example usage: aggregation_func(x, num_per_row) and returns: x