code: def test_deepcopy_reducer(self):
      loss_fn = ContrastiveLoss(
          pos_margin=0, neg_margin=2, reducer=AvgNonZeroReducer()
      )
      embeddings = torch.randn(128, 64)
      labels = torch.randint(low=0, high=10, size=(128,))
      loss_fn(embeddings, labels)
  
      if WITH_COLLECT_STATS:
          self.assertTrue(
              loss_fn.reducer.reducers["pos_loss"].num_past_filter > 0
          )
          self.assertTrue(
              loss_fn.reducer.reducers["neg_loss"].num_past_filter > 0
          )
  
imports: import unittest
  import torch
  from pytorch_metric_learning.losses import ContrastiveLoss
  from pytorch_metric_learning.reducers import AvgNonZeroReducer
  from ..None import WITH_COLLECT_STATS
label_desc: Use image node_id 1 for calling the TestModuleWithRecordsAndReducer obj's underlying member method code with example usage: obj.test_deepcopy_reducer() without return types