code: def __init__(self, weights, **kwargs):
      super().__init__(**kwargs)
      self.weights = weights
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/reducers/class_weighted_reducer.py
imports: import torch
  from ..utils import common_functions
  from .base_reducer import BaseReducer
label_desc: Use image node_id 1 to create a new ClassWeightedReducer object from inherited base classes: BaseReducer with example: obj = ClassWeightedReducer(weights)