code: def test_meter_distributed(self):
      # Meter0 will execute on one process, Meter1 on the other
      meters = [
          VideoAccuracyMeter(
              topk=[1, 2],
              clips_per_video_train=1,
              clips_per_video_test=2,
          ),
          VideoAccuracyMeter(
              topk=[1, 2],
              clips_per_video_train=1,
              clips_per_video_test=2,
          ),
      ]
  
      # Batchsize = 3, num classes = 3, score is a value in {1, 2,
      # 3}...3 is the highest score
      model_outputs = [
          torch.tensor(
              [
                  [1, 2, 3],
                  [1, 1, 3],
                  [2, 2, 1],
                  [3, 2, 1],
                  [2, 2, 2],
                  [2, 3, 1],
              ],
              dtype=torch.float,
          ),  # Meter 0
          torch.tensor(
              [
                  [3, 2, 1],
                  [3, 1, 2],
                  [1, 2, 2],
                  [1, 2, 3],
                  [2, 2, 2],
                  [1, 3, 2],
              ],
              dtype=torch.float,
          ),  # Meter 1
          torch.tensor(
              [
                  [1, 2, 3],
                  [1, 1, 3],
                  [2, 2, 1],
                  [3, 2, 1],
                  [2, 2, 2],
                  [2, 3, 1],
              ],
              dtype=torch.float,
          ),  # Meter 0
          torch.tensor(
              [
                  [3, 2, 1],
                  [3, 1, 2],
                  [1, 2, 2],
                  [1, 2, 3],
                  [2, 2, 2],
                  [1, 3, 2],
              ],
              dtype=torch.float,
          ),  # Meter 1
      ]
  
      # For meter 0, class 2 is the correct class for sample 1, class 0 for sample 2,
      # etc
      targets = [
          torch.tensor([0, 0, 1, 1, 2, 2]),  # Meter 0
          torch.tensor([0, 0, 1, 1, 2, 2]),  # Meter 1
          torch.tensor([0, 0, 1, 1, 2, 2]),  # Meter 0
          torch.tensor([0, 0, 1, 1, 2, 2]),  # Meter 1
      ]
  
      # In first two updates there are 3 correct top-2, 5 correct in top 2
      # The same occurs in the second two updates and is added to first
      expected_values = [
          {
              "top_1": 1 / 6.0,
              "top_2": 4 / 6.0,
          },  # After one update to each meter
          {
              "top_1": 2 / 12.0,
              "top_2": 8 / 12.0,
          },  # After two updates to each meter
      ]
  
      self.meter_distributed_test(
          meters,
          model_outputs,
          targets,
          expected_values,
          is_train=False,
      )
  
file_path: ClassyVision/test/meters_video_accuracy_meter_test.py
imports: import torch
  from classy_vision import meters
  from classy_vision.meters import VideoAccuracyMeter
  from test.generic.meter_test_utils import ClassificationMeterTest
label_desc: Use image node_id 8 for calling the TestVideoAccuracyMeter obj's underlying member method code with example usage: obj.test_meter_distributed() without return types