docstr: Sets up two processes each with a given meter on that process.
  Verifies that sync code path works.
docstr_tok: ["Sets","up","two","processes","each","with","a","given","meter","on","that","process",".","Verifies","that","sync","code","path","works","."]
code: def meter_distributed_test(
      self,
      meters,
      model_outputs,
      targets,
      expected_values,
      is_train=False,
  ):
      """
      Sets up two processes each with a given meter on that process.
      Verifies that sync code path works.
      """
      world_size = len(meters)
      assert world_size == 2, "This test only works for world_size of 2"
      assert len(model_outputs) == 4, (
          "Test assumes 4 model outputs, "
          "0, 2 passed to meter0 and 1, 3 passed to meter1"
      )
      assert (
          len(targets) == 4
      ), "Test assumes 4 targets, 0, 2 passed to meter0 and 1, 3 passed to meter1"
      assert len(expected_values) == 2, (
          "Test assumes 2 expected values, "
          "first is result of applying updates 0,1 to the meter, "
          "second is result of applying all 4 updates to meter"
      )
  
      qins, qouts, qerrs = self._spawn_all_meter_workers(
          world_size, meters, is_train=is_train
      )
  
      # First update each meter, then get value from each meter
      qins[0].put_nowait(
          (UPDATE_SIGNAL, (model_outputs[0], targets[0]))
      )
      qins[1].put_nowait(
          (UPDATE_SIGNAL, (model_outputs[1], targets[1]))
      )
  
      qins[0].put_nowait((VALUE_SIGNAL, None))
      qins[1].put_nowait((VALUE_SIGNAL, None))
  
      value0 = _get_value_or_raise_error(qouts[0], qerrs[0])
      value1 = _get_value_or_raise_error(qouts[1], qerrs[1])
      self._values_match_expected_value(
          value0, value1, expected_values[0]
      )
  
      # Verify that calling value again does not break things
      qins[0].put_nowait((VALUE_SIGNAL, None))
      qins[1].put_nowait((VALUE_SIGNAL, None))
  
      value0 = _get_value_or_raise_error(qouts[0], qerrs[0])
      value1 = _get_value_or_raise_error(qouts[1], qerrs[1])
      self._values_match_expected_value(
          value0, value1, expected_values[0]
      )
  
      # Second, update each meter, then get value from each meter
      qins[0].put_nowait(
          (UPDATE_SIGNAL, (model_outputs[2], targets[2]))
      )
      qins[1].put_nowait(
          (UPDATE_SIGNAL, (model_outputs[3], targets[3]))
      )
  
      qins[0].put_nowait((VALUE_SIGNAL, None))
      qins[1].put_nowait((VALUE_SIGNAL, None))
  
      value0 = _get_value_or_raise_error(qouts[0], qerrs[0])
      value1 = _get_value_or_raise_error(qouts[1], qerrs[1])
      self._values_match_expected_value(
          value0, value1, expected_values[1]
      )
  
      qins[0].put_nowait((SHUTDOWN_SIGNAL, None))
      qins[1].put_nowait((SHUTDOWN_SIGNAL, None))
  
imports: import multiprocessing
  import queue
  import tempfile
  import unittest
  import torch
label_desc: Use image node_id 12 for calling the ClassificationMeterTest obj's underlying member method code with example usage: obj.meter_distributed_test(meters, model_outputs, targets, expected_values, is_train) without return types