code: def set_stats(self, center_similarities):
      if self.collect_stats:
          with torch.no_grad():
              self.same_class_center_sim = torch.mean(
                  center_similarities[self.same_class_mask]
              ).item()
              self.diff_class_center_sim = torch.mean(
                  center_similarities[self.diff_class_mask]
              ).item()
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/regularizers/sparse_centers_regularizer.py
imports: import torch
  from ..distances import CosineSimilarity
  from ..reducers import DivisorReducer
  from ..utils import common_functions
  from .base_regularizer import BaseRegularizer
label_desc: Use image node_id 4 for calling the SparseCentersRegularizer obj's underlying member method code with example usage: obj.set_stats(center_similarities) without return types